File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -211,4 +211,26 @@ bool InputFile::getReadStream( const size_t streamIndex )
211
211
return _inputStreams.at ( streamIndex )->getBufferred ();
212
212
}
213
213
214
+ void InputFile::setProfile ( const Profile::ProfileDesc& desc )
215
+ {
216
+ ParamSet paramSet ( _formatContext );
217
+
218
+ for ( Profile::ProfileDesc::const_iterator it = desc.begin (); it != desc.end (); ++it )
219
+ {
220
+ if ( (*it).first == Profile::avProfileIdentificator ||
221
+ (*it).first == Profile::avProfileIdentificatorHuman ||
222
+ (*it).first == Profile::avProfileType )
223
+ continue ;
224
+
225
+ try
226
+ {
227
+ paramSet.set ( (*it).first , (*it).second );
228
+ }
229
+ catch ( std::exception& e )
230
+ {
231
+ std::cout << " InputFile warning: " << e.what () << std::endl;
232
+ }
233
+ }
234
+ }
235
+
214
236
}
Original file line number Diff line number Diff line change 12
12
#include < AvTranscoder/Metadatas/MediaMetadatasStructures.hpp>
13
13
#include < AvTranscoder/ProgressListener.hpp>
14
14
15
+ #include < AvTranscoder/Profile.hpp>
16
+
15
17
#include < string>
16
18
#include < vector>
17
19
@@ -114,6 +116,12 @@ class AvExport InputFile
114
116
* @return the reading status of the streamIndex
115
117
**/
116
118
bool getReadStream ( const size_t streamIndex );
119
+
120
+ /* *
121
+ * @brief Set the format of the input file
122
+ * @param desc: the profile of the input format
123
+ */
124
+ virtual void setProfile ( const Profile::ProfileDesc& desc );
117
125
118
126
protected:
119
127
AVFormatContext* _formatContext;
You can’t perform that action at this time.
0 commit comments