aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/Parse/EDID.pm75
1 files changed, 0 insertions, 75 deletions
diff --git a/lib/Parse/EDID.pm b/lib/Parse/EDID.pm
index 0abfbda..22865d3 100755
--- a/lib/Parse/EDID.pm
+++ b/lib/Parse/EDID.pm
@@ -596,81 +596,6 @@ sub ratio_name {
}
}
-sub to_MonitorsDB {
- my ($edid) = @_;
-
- if (!$edid->{monitor_range}) {
- print STDERR "No monitor range data in EDID.\n";
- return;
- }
- if (!$edid->{EISA_ID}) {
- print STDERR "No monitor EISA_ID in EDID.\n";
- return;
- }
-
- my $detailed_timings = $edid->{detailed_timings} || [];
- my @preferred_resolutions = map {
- join('x', $_->{horizontal_active}, $_->{vertical_active});
- } grep { !$_->{bad_ratio} } @$detailed_timings;
-
- (my $monitor_name = $edid->{monitor_name}) =~ s/;/,/g;
- my ($raw_vendor, $raw_model) = $edid->{EISA_ID} =~ /(...)(.*)/;
- my ($VendorName, $only_Model) =
- $monitor_name =~ /(\S+)\s(.*)/ ?
- ($1, $2) :
- ($raw_vendor, $monitor_name || $raw_model);
-
- join('; ',
- $VendorName, "$VendorName $only_Model", $edid->{EISA_ID},
- sprintf("%u-%u", $edid->{monitor_range}{horizontal_min}, $edid->{monitor_range}{horizontal_max}),
- sprintf("%u-%u", $edid->{monitor_range}{vertical_min}, $edid->{monitor_range}{vertical_max}),
- @$detailed_timings == 1 ? @preferred_resolutions : (),
- );
-}
-
-sub print_edid {
- my ($edid, $verbose) = @_;
-
- print "Name: $edid->{monitor_name}\n" if $edid->{monitor_name};
- print "EISA ID: $edid->{EISA_ID}\n" if $edid->{EISA_ID};
- print "EDID version: $edid->{edid_version}.$edid->{edid_revision}\n";
- # this is a number, despite the official name containing "flag":
- print "EDID extension blocks: $edid->{extension_flag}\n";
- printf "Screen size: %.1f cm x %.1f cm (%3.2f inches%s)\n",
- $edid->{max_size_horizontal},
- $edid->{max_size_vertical},
- $edid->{diagonal_size},
- $edid->{ratio_name} ? sprintf(", aspect ratio %s = %.2f", $edid->{ratio_name}, $edid->{ratio}) :
- $edid->{ratio} ? sprintf(", aspect ratio %.2f", $edid->{ratio}) : '';
-
- print "Gamma: ", $edid->{gamma} / 100 + 1, "\n";
- printf "%s signal\n", $edid->{video_input_definition}{digital} ? 'Digital' : 'Analog';
-
- if ($verbose) {
- foreach (@{$edid->{established_timings} || []}) {
- print "Standard resolution: $_->{X}x$_->{Y} @ $_->{vfreq} Hz (established timing)\n" if !$_->{interlace};
- }
- foreach (@{$edid->{standard_timings} || []}) {
- print "Standard resolution: $_->{X}x$_->{Y} @ $_->{vfreq} Hz, ratio $_->{ratio}",
- $edid->{ratio_name} && index($edid->{ratio_name}, $_->{ratio}) == -1 ? ' (!)' : '',
- "\n";
- }
- }
-
- if ($edid->{monitor_range}) {
- printf "Max video bandwidth: %u MHz\n", $edid->{monitor_range}{pixel_clock_max} if $edid->{monitor_range}{pixel_clock_max};
- print "\n";
- printf "\tHorizSync %u-%u\n", $edid->{monitor_range}{horizontal_min}, $edid->{monitor_range}{horizontal_max};
- printf "\tVertRefresh %u-%u\n", $edid->{monitor_range}{vertical_min}, $edid->{monitor_range}{vertical_max};
- }
-
- foreach my $h (@{$edid->{detailed_timings}}) {
- print "\n";
- print "\t", $h->{ModeLine_comment}, $h->{bad_ratio} ? ' (bad ratio)' : '', "\n";
- print "\tModeLine ", $h->{ModeLine}, "\n";
- }
-}
-
sub edid_from_lines {
my (@l) = @_;
my $edid_str = join('', map { /\s+([0-9a-f]{32})$/ && $1 } @l);