Skip to content

Commit 641af43

Browse files
update to valide audio profiles
1 parent e8a9a94 commit 641af43

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

app/presetChecker/presetChecker.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <AvTranscoder/Profile.hpp>
55

66
#include <AvTranscoder/OutputStreamVideo.hpp>
7+
#include <AvTranscoder/OutputStreamAudio.hpp>
78

89

910
int main( int argc, char** argv )
@@ -21,8 +22,18 @@ int main( int argc, char** argv )
2122
for( auto key : profile )
2223
std::cout << std::setw(35) << key.first << key.second << std::endl;
2324

24-
avtranscoder::OutputStreamVideo outputVideoStream;
25-
outputVideoStream.setProfile( profile[ "avProfile" ] );
25+
if( profile.find( avtranscoder::Profile::avProfileType )->second == avtranscoder::Profile::avProfileTypeVideo )
26+
{
27+
avtranscoder::OutputStreamVideo outputVideoStream;
28+
outputVideoStream.setProfile( profile.find( avtranscoder::Profile::avProfileIdentificator )->second );
29+
}
30+
31+
if( profile.find( avtranscoder::Profile::avProfileType )->second == avtranscoder::Profile::avProfileTypeAudio )
32+
{
33+
avtranscoder::OutputStreamAudio outputAudioStream;
34+
outputAudioStream.setProfile( profile.find( avtranscoder::Profile::avProfileIdentificator )->second );
35+
}
36+
2637
}
2738

2839
}

src/AvTranscoder/OutputStreamVideo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ void OutputStreamVideo::setProfile( const std::string& profile )
195195
continue;
196196
if( (*it).first == "avProfileLong" )
197197
continue;
198+
if( (*it).first == Profile::avProfileType )
199+
continue;
198200
if( (*it).first == "codec" )
199201
continue;
200202
if( (*it).first == "pix_fmt" )
@@ -222,6 +224,8 @@ void OutputStreamVideo::setProfile( const std::string& profile )
222224
continue;
223225
if( (*it).first == "avProfileLong" )
224226
continue;
227+
if( (*it).first == Profile::avProfileType )
228+
continue;
225229
if( (*it).first == "codec" )
226230
continue;
227231
if( (*it).first == "pix_fmt" )

0 commit comments

Comments
 (0)