@@ -14,6 +14,8 @@ int main( int argc, char** argv )
14
14
15
15
std::cout << p.getProfiles ().size () << std::endl;
16
16
17
+ size_t presetInError = 0 ;
18
+
17
19
std::cout << std::left;
18
20
19
21
for ( auto profile : p.getProfiles () )
@@ -22,18 +24,35 @@ int main( int argc, char** argv )
22
24
for ( auto key : profile )
23
25
std::cout << std::setw (35 ) << key.first << key.second << std::endl;
24
26
25
- if ( profile.find ( avtranscoder::Profile::avProfileType )->second == avtranscoder::Profile::avProfileTypeVideo )
26
- {
27
- avtranscoder::OutputVideo outputVideo;
28
- outputVideo.setProfile ( profile, outputVideo.getVideoDesc ().getVideoFrameDesc () );
27
+ try {
28
+ if ( profile.find ( avtranscoder::Profile::avProfileType )->second == avtranscoder::Profile::avProfileTypeVideo )
29
+ {
30
+ avtranscoder::OutputVideo outputVideo;
31
+ outputVideo.setProfile ( profile, outputVideo.getVideoDesc ().getVideoFrameDesc () );
32
+ }
33
+
34
+ if ( profile.find ( avtranscoder::Profile::avProfileType )->second == avtranscoder::Profile::avProfileTypeAudio )
35
+ {
36
+ avtranscoder::OutputAudio outputAudio;
37
+ outputAudio.setProfile ( profile, outputAudio.getAudioDesc ().getFrameDesc () );
38
+ }
29
39
}
30
-
31
- if ( profile.find ( avtranscoder::Profile::avProfileType )->second == avtranscoder::Profile::avProfileTypeAudio )
40
+ catch ( ... )
32
41
{
33
- avtranscoder::OutputAudio outputAudio ;
34
- outputAudio. setProfile ( profile, outputAudio. getAudioDesc (). getFrameDesc () ) ;
42
+ std::cout << " ERROR on preset ! " << std::endl ;
43
+ presetInError ++ ;
35
44
}
36
-
37
45
}
38
46
39
- }
47
+ std::cout << " ********************" << std::endl;
48
+ std::cout << " Result: " << std::endl;
49
+ if ( presetInError )
50
+ {
51
+ std::cout << presetInError << " / " << p.getProfiles ().size () << " are incorrects" << std::endl;
52
+ }
53
+ else
54
+ {
55
+ std::cout << " every presets are corrects" << std::endl;
56
+ }
57
+ std::cout << " ********************" << std::endl;
58
+ }
0 commit comments