diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-03-05 13:56:45 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-03-05 13:56:45 +0000 |
commit | fbcdc89dfd7f9f93e68715c32b70d9bd46da8dc6 (patch) | |
tree | 9667aa2722d84d4d47cda2ce6652d05932ccf7f4 | |
parent | 51ec68a7c18b3cfa03e72861912830e4f66ed257 (diff) | |
download | drakx-fbcdc89dfd7f9f93e68715c32b70d9bd46da8dc6.tar drakx-fbcdc89dfd7f9f93e68715c32b70d9bd46da8dc6.tar.gz drakx-fbcdc89dfd7f9f93e68715c32b70d9bd46da8dc6.tar.bz2 drakx-fbcdc89dfd7f9f93e68715c32b70d9bd46da8dc6.tar.xz drakx-fbcdc89dfd7f9f93e68715c32b70d9bd46da8dc6.zip |
- (getTVcards, isTVcard) : consolidate tv detection code
- no need to keep capture buffer (not a big slow down but small rivers
make big ones...)
-rw-r--r-- | perl-install/detect_devices.pm | 6 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakxtv | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index fe88d2ca7..7093ce36d 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -373,6 +373,12 @@ sub getSoundDevices { (arch() =~ /ppc/ ? \&modules::load_category : \&modules::probe_category)->('multimedia/sound'); } +sub isTVcard { $_[0]{driver} =~ /bttv|saa7134/ } + +sub getTVcards { + grep { isTVcard($_) } detect_devices::probeall(); +} + sub getSerialModem { my ($modem, $mouse) = @_; $mouse ||= {}; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index f998f798d..af387c92d 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -967,7 +967,7 @@ sub summary { }; } - foreach my $tv (grep { $_->{driver} =~ /(bttv|saa7134)/ } detect_devices::probeall()) { + foreach my $tv (detect_devices::getTVcards()) { push @l, { group => N("Hardware"), label => N("TV card"), diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv index 1325c7957..4c258dbf9 100755 --- a/perl-install/standalone/drakxtv +++ b/perl-install/standalone/drakxtv @@ -133,7 +133,7 @@ push @devices, { driver => 'bttv', description => 'dummy' } if $::testing && !@d if (@devices) { # TODO: That need some work for multiples TV cards foreach (@devices) { - if ($< == 0 && (grep { $_->{driver} =~ /(bttv|saa7134)/ } @devices)) { + if ($< == 0 && (grep { detect_devices::isTVcard($_) } @devices)) { require harddrake::v4l; require modules; no strict 'subs'; |