annotate debian/config @ 4218:3931c41f740a

Added new syncengine thanks to a new previously undocumented feature of the em8300, this might fix playback on both slow and fast machines (more testing needed). This also requires users to get the em8300 driver from cvs until the next version is released (will probably happen this weekend) Added lots of comments, should be pretty easy to understand most of the internals now Added lots of brackets to if's for's while's etc, this is not a cosmetical thing but rather due to the fact I got some very odd bugs with else's since I didn't properly use brackets (and it's the K&R standard to have brackets everywhere) Fixed some bugs that would occur when disabling libmp1e Switched to default to the new naming scheme of device nodes, the driver will slowly switch over to this state, if it can't find devices under the new name it will try the old naming scheme I stopped opening devices in non-blocking mode, it would break the new syncengine which tries to burst data to the device (alot of times meaning it will fill the fifo pretty fast which would previously result in jerkyness on fast machines) The device now sets the initial state of the pts and speed (probably not needed, but assumption is the mother of all fuckups =) Keep the control interface open during the entire duration of the libvo device, we might need this to flush video buffers on seeking (currently not implemented, therefore seeking is broken) This is beta stuff to the driver, I will get some users to test it for me and do my best to fix seeking as soon as possible...
author mswitch
date Thu, 17 Jan 2002 10:33:47 +0000
parents 10e236ceac5e
children 0737156ad1f0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
1 #!/usr/bin/perl -w
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
2
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
3 # Script to configure mplayer
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
4 # based on etherconf by John Goerzen <jgoerzen@progenylinux.com>
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
5
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
6 use Debian::DebConf::Client::ConfModule qw(:all);
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
7
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
8 my $version = version(2.0);
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
9 title('MPlayer Configuration');
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
10 my $PRIORITY = 'high';
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
11 #TODO: 'medium'
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
12 my $next = 'mainmenu';
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
13 my $isediting = 0;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
14
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
15 my @nextargs = ();
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
16
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
17 checkupgrade(); # Find out if we have to upgrade.
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
18 mainloop(letsgo());
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
19
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
20 sub checkupgrade {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
21 open(MCFG, "</etc/mplayer.conf") || return 1;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
22 my $line = <MCFG>;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
23 return 1 if ($line =~ /mplayer DEBCONF AREA/);
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
24 exit(0) if (input($PRIORITY, 'mplayer/replace-existing-files') eq "question skipped");
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
25 go();
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
26 if (get('mplayer/replace-existing-files') eq 'false') {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
27 input($PRIORITY, 'mplayer/replace-existing-files-bail');
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
28 go();
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
29 exit();
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
30 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
31 close MCFG;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
32 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
33
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
34 sub mainloop {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
35 $next = shift @_;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
36 do {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
37 my @retval = &$next(@nextargs);
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
38 # if ($retval[0] eq 'BACK') {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
39 # $retval[0] = $backups{$next};
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
40 # }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
41 ($next, @nextargs) = @retval;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
42 } while ($next ne 'Exit');
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
43 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
44
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
45 sub letsgo {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
46 #useless!
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
47 return "configure";
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
48 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
49
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
50 sub configure {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
51 subst("mplayer/voutput", "vochoices", "xv, xmga, mga, x11, gl, sdl");
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
52 # db_subst mplayer/output vo xc,xmga,mga,x11,gl,sdl
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
53 exit(0) if (input($PRIORITY, "mplayer/voutput") eq "question skipped");
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
54 go();
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
55 exit 0 unless (get("mplayer/voutput") eq 'true');
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
56 #return 'audioout';
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
57 return 'mainmenu';
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
58 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
59
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
60 sub mainmenu {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
61 go(); # To catch spare things from before
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
62 my @choices = (
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
63 'Video Output: ' . scalar(get("mplayer/voutput")));
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
64 #,
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
65 $choices = join(', ', @choices);
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
66 $isediting = 1;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
67
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
68 subst('mplayer/mainmenu', 'choices', $choices);
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
69 input($PRIORITY, 'mplayer/mainmenu');
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
70 go();
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
71
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
72 my $selection = get('mplayer/mainmenu');
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
73 if ($selection =~ /^Exit/) {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
74 return 'Exit';
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
75 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
76
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
77 # Set to redisplay.
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
78 fset('mplayer/mainmenu', 'isdefault', 'true');
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
79
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
80 $_ = $selection;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
81
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
82 return 'configure' if /^Video/;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
83 # return 'aoutput' if /^Aoutput/;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
84 return 'Exit';
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
85 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
86
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
87 sub editreturn {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
88 my @args = @_;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
89 return 'mainmenu' if $isediting;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
90 return @args;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
91 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
92
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
93 sub editfix {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
94 my $template = shift @_;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
95 if ($isediting) {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
96 fset($template, 'isdefault', 'true');
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
97 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
98 }