File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 4
4
#include < AvTranscoder/Profile.hpp>
5
5
6
6
#include < AvTranscoder/OutputStreamVideo.hpp>
7
+ #include < AvTranscoder/OutputStreamAudio.hpp>
7
8
8
9
9
10
int main ( int argc, char ** argv )
@@ -21,8 +22,18 @@ int main( int argc, char** argv )
21
22
for ( auto key : profile )
22
23
std::cout << std::setw (35 ) << key.first << key.second << std::endl;
23
24
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
+
26
37
}
27
38
28
39
}
Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ void OutputStreamVideo::setProfile( const std::string& profile )
195
195
continue ;
196
196
if ( (*it).first == " avProfileLong" )
197
197
continue ;
198
+ if ( (*it).first == Profile::avProfileType )
199
+ continue ;
198
200
if ( (*it).first == " codec" )
199
201
continue ;
200
202
if ( (*it).first == " pix_fmt" )
@@ -222,6 +224,8 @@ void OutputStreamVideo::setProfile( const std::string& profile )
222
224
continue ;
223
225
if ( (*it).first == " avProfileLong" )
224
226
continue ;
227
+ if ( (*it).first == Profile::avProfileType )
228
+ continue ;
225
229
if ( (*it).first == " codec" )
226
230
continue ;
227
231
if ( (*it).first == " pix_fmt" )
You can’t perform that action at this time.
0 commit comments