File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -183,4 +183,46 @@ bool OutputFile::endWrap( )
183
183
return true ;
184
184
}
185
185
186
+
187
+ void OutputFile::setProfile ( const Profile::ProfileDesc& desc )
188
+ {
189
+ ParamSet paramSet ( _formatContext );
190
+
191
+ for ( Profile::ProfileDesc::const_iterator it = desc.begin (); it != desc.end (); ++it )
192
+ {
193
+ if ( (*it).first == Profile::avProfileIdentificator ||
194
+ (*it).first == Profile::avProfileIdentificatorHuman ||
195
+ (*it).first == Profile::avProfileType )
196
+ continue ;
197
+
198
+ try
199
+ {
200
+ paramSet.set ( (*it).first , (*it).second );
201
+ }
202
+ catch ( std::exception& e )
203
+ {
204
+ std::cout << " OutputFile warning: " << e.what () << std::endl;
205
+ }
206
+ }
207
+
208
+ setup ();
209
+
210
+ for ( Profile::ProfileDesc::const_iterator it = desc.begin (); it != desc.end (); ++it )
211
+ {
212
+ if ( (*it).first == Profile::avProfileIdentificator ||
213
+ (*it).first == Profile::avProfileIdentificatorHuman ||
214
+ (*it).first == Profile::avProfileType )
215
+ continue ;
216
+
217
+ try
218
+ {
219
+ paramSet.set ( (*it).first , (*it).second );
220
+ }
221
+ catch ( std::exception& e )
222
+ {
223
+ std::cout << " OutputFile 2.warning: " << e.what () << std::endl;
224
+ }
225
+ }
226
+ }
227
+
186
228
}
Original file line number Diff line number Diff line change 9
9
10
10
#include < AvTranscoder/CodedStream/AvOutputStream.hpp>
11
11
12
+ #include < AvTranscoder/Profile.hpp>
13
+
12
14
#include < string>
13
15
#include < vector>
14
16
@@ -82,6 +84,12 @@ class AvExport OutputFile
82
84
* @note this method write the footer of file if necessary
83
85
**/
84
86
virtual bool endWrap ( );
87
+
88
+ /* *
89
+ * @brief Set the format of the output file
90
+ * @param desc: the profile of the output format
91
+ */
92
+ virtual void setProfile ( const Profile::ProfileDesc& desc );
85
93
86
94
private:
87
95
std::vector<AvOutputStream*> _outputStreams;
You can’t perform that action at this time.
0 commit comments