« 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
| |||||||||||
| 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
| |||||||||||
| 28 | 0 | return $writemap{$detected}; | |||||||||
| 29 | } else { | ||||||||||
| 30 | 0 | return $detected; | |||||||||
| 31 | } | ||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 16 | 1; | |||||||||