Branch Coverage

blib/lib/Linux/DVB/DVBT/Advert.pm
Criterion Covered Total %
branch 9 508 1.7


line true false branch
223 0 0 if defined $level
241 2 0 if ($new_path)
271 0 1 if $DEBUG >= 10
273 0 1 unless ($ad_config_href)
278 0 1 if $DEBUG >= 10
282 0 1 if $DEBUG >= 10
316 0 1 if ($DEBUG)
361 0 0 if ($DEBUG)
372 0 0 if ($DEBUG)
378 0 0 if (ok_to_detect($settings_href))
389 0 0 if ($DEBUG)
400 0 0 if ($DEBUG)
408 0 0 if ($detect)
410 0 0 unless open my $fh, ">$detect"
416 0 0 if (ref $$save_settings_href{$var} eq 'HASH') { }
434 0 0 if ref $$frame_href{$field}
435 0 0 if $field eq $FRAME_FIELD
442 0 0 unless scalar keys %$frame_href
447 0 0 if ref $$frame_href{$field}
448 0 0 if $field eq $FRAME_FIELD
478 0 5 unless open my $fh, "<$detect"
493 1 4 if ($DEBUG >= 10)
519 0 0 if (open my $fh, "<$expected_file")
532 0 0 if ($line =~ /^\s*(\d+)\)\s+(\d+)\s+(\d+)\s+(\d+):(\d+):(\d+)\.(\d+)/)
595 0 0 if ($DEBUG)
602 0 0 if ($DEBUG)
616 0 0 if ($DEBUG)
629 0 0 if ($expected_aref and ref $expected_aref eq 'ARRAY')
636 0 0 if ($expect_href)
638 0 0 if ($framenum >= $$expect_href{'start'} and $framenum <= $$expect_href{'end'}) { }
0 0 elsif ($framenum > $$expect_href{'end'}) { }
650 0 0 if $DEBUG >= 3
654 0 0 if (scalar @$frames_adata_aref)
661 0 0 unless $total_frames
667 0 0 if $DEBUG
720 0 0 unless (ok_to_detect($global_settings_href))
741 0 0 if ($expected_aref)
748 0 0 if $DEBUG
750 0 0 if ($logo_frames_percent > 90)
752 0 0 if $DEBUG
760 0 0 if (@$black_frames_ada_ref)
776 0 0 if $DEBUG
782 0 0 if (@$logo_frames_ada_aref)
802 0 0 if $DEBUG
805 0 0 if (@logo_cut_list >= @cut_list) { }
812 0 0 if $DEBUG
819 0 0 if (not @logo_cut_list and @$new_black_frames_aref and $silent_frames_ada_aref)
834 0 0 if $DEBUG
837 0 0 if (@silent_cut_list)
849 0 0 if ($DEBUG)
852 0 0 if (@black_cut_list)
856 0 0 if (@logo_cut_list)
860 0 0 if (@silent_cut_list)
870 0 0 if ($csv)
909 0 0 unless -f $src_file
910 0 0 unless -s $src_file
911 0 0 unless $cut_file
915 0 0 unless (-d $dir)
918 0 0 unless mkpath([$dir], $DEBUG, 493)
940 0 0 unless -f $src_file
941 0 0 unless -s $src_file
942 0 0 unless $cut_file
946 0 0 unless (-d $dir)
949 0 0 unless mkpath([$dir], $DEBUG, 493)
973 0 0 if (exists $$settings_href{'detection_method'} and $$settings_href{'detection_method'})
1000 0 0 if ($fname)
1003 0 0 if ($force or not $force || -f $fname)
1135 0 0 if $first_frame > $$add_frames_aref[0]{'frame'}
1136 0 0 if $last_frame < $$add_frames_aref[-1]{'frame_end'}
1151 0 0 if (exists $add_frames{$fnum}) { }
0 0 elsif (exists $add_frames{$fnum}) { }
1182 0 0 if $frame_start < 0
1199 0 0 if (exists $fuzzy_frames{$fnum})
1204 0 0 if ($ok)
1277 0 0 if ($DEBUG)
1286 0 0 unless $window
1290 0 0 if ($DEBUG)
1293 0 0 if ($$this_href{'frame'} >= $min_framenum and $$this_href{'frame'} >= $min_framenum and $$this_href{'gap'} >= $min_gap)
1296 0 0 if ($DEBUG)
1304 0 0 if ($gap_href)
1309 0 0 if ($DEBUG)
1312 0 0 if ($DEBUG)
1447 0 0 if $DEBUG
1461 0 0 if $DEBUG
1467 0 0 if ($framenum < $$cut_href{'frame'}) { }
0 0 elsif ($framenum >= $$cut_href{'frame'} and $framenum <= $$cut_href{'frame_end'}) { }
0 0 elsif ($framenum > $$cut_href{'frame_end'}) { }
1480 0 0 if (@cuts) { }
1495 0 0 if $DEBUG
1519 0 0 if (defined $fnum_end and $fnum_end > $fnum_start) { }
1542 0 0 if $DEBUG
1544 0 0 unless open my $fh, ">$fname"
1563 0 0 exists $$href{$head} ? :
1673 0 0 if ($duration <= $$settings_href{'max_advert'}) { }
0 0 elsif ($duration >= $$settings_href{'min_program'}) { }
1676 0 0 if $DEBUG >= 2
1681 0 0 if $DEBUG >= 2
1692 0 0 if $DEBUG
1702 0 0 if ($period > 0)
1708 0 0 if ($DEBUG)
1709 0 0 if ($prog_period < $$settings_href{'min_program'})
1711 0 0 if $DEBUG
1712 0 0 if (scalar @list) { }
1714 0 0 if ($DEBUG)
1721 0 0 if $DEBUG
1730 0 0 if ($ok)
1732 0 0 if ($DEBUG)
1746 0 0 if (defined $prev_end)
1749 0 0 if $DEBUG
1750 0 0 if ($prog_period >= $$settings_href{'min_program'})
1752 0 0 if $DEBUG
1754 0 0 if $DEBUG
1761 0 0 if $DEBUG
1762 0 0 if ($i == 0 or $period >= $$settings_href{'min_advert'} or $i == $num_entries - 1)
1765 0 0 if $DEBUG
1767 0 0 if $DEBUG
1785 0 0 if $DEBUG
1793 0 0 if ($DEBUG >= 2)
1796 0 0 if ($$frames_aref[$idx]{'gap'} > $$settings_href{'frame_window'}) { }
1798 0 0 if ($DEBUG)
1810 0 0 if ($curr_href and numframes($curr_href) < $$settings_href{'min_frames'})
1814 0 0 if ($DEBUG)
1829 0 0 if (scalar @frames >= 2)
1832 0 0 if ($DEBUG)
1838 0 0 if (not $curr_href) { }
1857 0 0 if ($curr_href and numframes($curr_href) < $$settings_href{'min_frames'})
1859 0 0 if ($DEBUG)
1864 0 0 if $DEBUG
1886 0 0 if ($secs > 60)
1888 0 0 if ($secs > 3600)
1898 0 0 if ($hours)
1902 0 0 if ($mins)
1925 0 0 if ($secs > 60)
1927 0 0 if ($secs > 3600)
1975 0 0 if (exists $$frame_href{'match_percent'})
1979 0 0 if (exists $$frame_href{'weight'})
1983 0 0 if (exists $$frame_href{'ave_percent'})
1991 0 0 if (exists $$frame_href{'type'})
1996 0 0 if (exists $$frame_href{'adverts'})
2000 0 0 if (exists $$frame_href{'frame_start'})
2023 0 0 $$edge_href{'type'} eq 'start_pkt' ? :
2027 0 0 if $$href{'gap'} > 1
2029 0 0 if ($edge_href and $$href{'frame'} == $$edge_href{'frame'} and $$edge_href{'type'} eq 'start_pkt')
2031 0 0 $$edge_href{'type'} eq 'start_pkt' ? :
2034 0 0 if $$href{'gap'} < 0
2038 0 0 if ($edge_href and $$href{'frame'} == $$edge_href{'frame'} and $$edge_href{'type'} eq 'end_pkt')
2040 0 0 $$edge_href{'type'} eq 'start_pkt' ? :
2079 0 0 if $DEBUG
2102 0 0 if ($DEBUG)
2109 0 0 if ($type eq 'program') { }
2111 0 0 if $DEBUG
2121 0 0 if $DEBUG
2125 0 0 if (not $curr_href) { }
2134 0 0 if $DEBUG
2144 0 0 if $DEBUG
2150 0 0 if (@cut_list)
2154 0 0 if ($$start_href{'type'} ne 'program')
2164 0 0 if ($end_type ne 'program')
2181 0 0 if ($DEBUG)
2193 0 0 if $DEBUG >= 2
2208 0 0 if $DEBUG >= 2
2219 0 0 if ($DEBUG)
2239 0 0 if ($DEBUG >= 2)
2251 0 0 if $last_framenum < $frames[-1]{'frame'}
2252 0 0 if $DEBUG
2256 0 0 if (exists $silent_frames{$framenum}) { }
0 0 elsif (exists $silent_black_frames{$framenum}) { }
2259 0 0 if ($DEBUG)
2264 0 0 if ($DEBUG)
2267 0 0 if ($href)
2276 0 0 if $DEBUG >= 2
2285 0 0 if ($$settings_href{'reduce_end'})
2309 0 0 if $DEBUG >= 2
2334 0 0 if ($frame_end <= $framenum) { }
0 0 elsif ($$href{'frame'} > $framenum) { }
2357 0 0 if ($edge_ref)
2359 0 0 unless defined $$edge_ref
2367 0 0 if ($DEBUG)
2385 0 0 if ($DEBUG)
2413 0 0 if ($DEBUG)
2420 0 0 if ($detect_mode eq 'rise') { }
2423 0 0 if ($$href{'ave_percent'} >= $$settings_href{'logo_rise_threshold'})
2433 0 0 if ($$href{'ave_percent'} < $$settings_href{'logo_fall_threshold'})
2441 0 0 if ($above) { }
2443 0 0 unless ($prev)
2445 0 0 if ($DEBUG)
2460 0 0 if $extend_start < 0
2463 0 0 if ($$frames_adata_aref[$fnum]{'match_percent'} >= $$settings_href{'logo_rise_threshold'}) { }
2466 0 0 if ($DEBUG)
2479 0 0 if $DEBUG
2482 0 0 if $DEBUG
2485 0 0 if $DEBUG
2488 0 0 if $DEBUG
2491 0 0 if ($black_before < $start_framenum and $start_framenum - $black_before < $$settings_href{'logo_ave_points'})
2499 0 0 if (not $found_edge and $scene_before < $start_framenum and $start_framenum - $scene_before < $$settings_href{'logo_ave_points'})
2505 0 0 if $DEBUG
2508 0 0 if ($found_edge and $edge and $edge <= $$settings_href{'logo_ave_points'})
2510 0 0 if $DEBUG
2515 0 0 if ($$frames_adata_aref[$fnum]{'match_percent'} >= $$settings_href{'logo_fall_threshold'}) { }
2528 0 0 if $fnum <= $$settings_href{'frame_window'}
2534 0 0 if ($$frames_adata_aref[$fnum]{'match_percent'} >= $$settings_href{'logo_rise_threshold'})
2536 0 0 if ($DEBUG)
2548 0 0 unless ($found_edge)
2561 0 0 if ($$frames_adata_aref[$start_index]{'match_percent'} >= $$settings_href{'logo_rise_threshold'}) { }
2572 0 0 if ($DEBUG)
2578 0 0 if ($$buff_href{'match_percent'} > $$settings_href{'logo_rise_threshold'})
2580 0 0 if ($DEBUG)
2588 0 0 if $DEBUG >= 2
2599 0 0 if ($prev)
2601 0 0 if ($DEBUG)
2605 0 0 if $DEBUG >= 2
2613 0 0 if $start_index < 0
2615 0 0 if ($DEBUG)
2620 0 0 if (scalar @$logo_frames_adl_aref)
2625 0 0 if $DEBUG >= 2
2626 0 0 if $DEBUG >= 2
2630 0 0 if ($$frames_adata_aref[$new_framenum]{'match_percent'} >= $$settings_href{'logo_rise_threshold'})
2632 0 0 if ($DEBUG)
2642 0 0 if $DEBUG >= 2
2645 0 0 if (@end_frames)
2651 0 0 if ($DEBUG)
2659 0 0 if $DEBUG >= 2
2664 0 0 if $DEBUG
2667 0 0 if $DEBUG
2670 0 0 if $DEBUG
2673 0 0 if $DEBUG
2676 0 0 if $DEBUG
2681 0 0 if ($black_after > $end_framenum and $black_after - $end_framenum < $$settings_href{'logo_ave_points'})
2688 0 0 if (not $found_edge and $scene_after > $end_framenum and $scene_after - $end_framenum < $$settings_href{'logo_ave_points'})
2694 0 0 if (not $found_edge and $DEBUG)
2701 0 0 if $DEBUG >= 2
2719 0 0 if $DEBUG >= 2
2727 0 0 if $DEBUG >= 2
2746 0 0 if ($$settings_href{'reduce_end'})
2770 0 0 if $DEBUG
2779 0 0 if ($$href{'gap'} >= $$settings_href{'max_gap'}) { }
2781 0 0 if $DEBUG
2790 0 0 if $DEBUG
2791 0 0 if (not $curr_href) { }
2793 0 0 if $DEBUG
2802 0 0 if $DEBUG
2810 0 0 if $DEBUG
2814 0 0 if (@blocks)
2833 0 0 if ($$cut_href{'frame'} >= $$cut_href{'frame_end'})
2857 0 0 unless open my $fh, "<$advfile"
2868 0 0 unless $line
2874 0 0 if (@head) { }
2883 0 0 if $head[$i] eq $FRAME_FIELD
2886 0 0 if defined $framenum
2929 0 0 if (not $prog and $prog_change)
2940 0 0 unless ($prog)
2947 0 0 if ($prog and $prog_change)
2949 0 0 if ($cut_href)
2958 0 0 if ($cut_href)