blib/lib/Media/Convert/CodecMap.pm

filter: Statementstmt 80.0% 16 / 20 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 68.9% 20 / 29 CC 2 SCAR 11.0
CC
2
Cov
71%
detect_to_write
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« blib/lib/Media/Convert/Normalizer/None.pm ↑ Summary blib/lib/Media/Convert/Asset/Profile/mpeg2.pm »
1 package Media::Convert::CodecMap;
2  
3 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 16 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 16 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 16 our @EXPORT_OK=qw/detect_to_write/;
9  
10 16 my %writemap = (
11 'vorbis' => 'libvorbis',
12 'vp8' => 'libvpx',
13 'vp9' => 'libvpx-vp9',
14 'h264' => 'libx264',
15 'hevc' => 'libx265',
16 'opus' => 'libopus',
17 );
18  
19 16 open my $check_fdk, "-|", "ffmpeg -hide_banner -h encoder=libfdk_aac";
20 16 ▶if(<$check_fdk> !~ /is not recognized/) {
Branch: 1 branch
BranchTrueFalseTotal
unless (readline($check_fdk) =~ /is not recognized/) 16 0 16
21 16 $writemap{aac} = 'libfdk_aac';
22 }
23 16 close $check_fdk;
24  
25 0 ▶sub detect_to_write {
Subroutine detect_to_write: not called CC=2 SCAR=17.9
Pod undocumented
26 0 my $detected = shift;
27 0 ▶ if(exists($writemap{$detected})) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $writemap{$detected}) { } 0 0 0
28 0 return $writemap{$detected};
29 } else {
30 0 return $detected;
31 }
32 }
33  
34 16 1;
« blib/lib/Media/Convert/Normalizer/None.pm ↑ Summary blib/lib/Media/Convert/Asset/Profile/mpeg2.pm »