@@ -181,19 +181,20 @@ bool OutputStreamVideo::encodeFrame( DataStream& codedFrame )
181
181
void OutputStreamVideo::setProfile ( const std::string& profile )
182
182
{
183
183
Profile p;
184
+
184
185
p.loadProfiles ();
185
186
186
187
Profile::ProfileDesc prof = p.getProfile ( profile );
187
188
188
- _videoDesc.setVideoCodec ( prof[" codec" ] );
189
+ _videoDesc.setVideoCodec ( prof[ " codec" ] );
189
190
_videoDesc.setTimeBase ( 1 , 25 ); // 25 fps
190
- _videoDesc.setImageParameters ( 1920 , 1080 , av_get_pix_fmt ( prof[" pix_fmt" ].c_str () ) );
191
+ _videoDesc.setImageParameters ( 1920 , 1080 , av_get_pix_fmt ( prof[ " pix_fmt" ].c_str () ) );
191
192
192
193
for ( Profile::ProfileDesc::iterator it = prof.begin (); it != prof.end (); ++it )
193
194
{
194
- if ( (*it).first == " avProfile " )
195
+ if ( (*it).first == Profile::avProfileIdentificator )
195
196
continue ;
196
- if ( (*it).first == " avProfileLong " )
197
+ if ( (*it).first == Profile::avProfileIdentificatorHuman )
197
198
continue ;
198
199
if ( (*it).first == Profile::avProfileType )
199
200
continue ;
@@ -220,9 +221,9 @@ void OutputStreamVideo::setProfile( const std::string& profile )
220
221
221
222
for ( Profile::ProfileDesc::iterator it = prof.begin (); it != prof.end (); ++it )
222
223
{
223
- if ( (*it).first == " avProfile " )
224
+ if ( (*it).first == Profile::avProfileIdentificator )
224
225
continue ;
225
- if ( (*it).first == " avProfileLong " )
226
+ if ( (*it).first == Profile::avProfileIdentificatorHuman )
226
227
continue ;
227
228
if ( (*it).first == Profile::avProfileType )
228
229
continue ;
@@ -244,7 +245,6 @@ void OutputStreamVideo::setProfile( const std::string& profile )
244
245
std::cout << " 2.warning: " << e.what () << std::endl;
245
246
}
246
247
}
247
-
248
248
}
249
249
250
250
}
0 commit comments