File tree Expand file tree Collapse file tree 3 files changed +15
-16
lines changed
src/AvTranscoder/transcoder Expand file tree Collapse file tree 3 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -329,10 +329,10 @@ bool StreamTranscoder::processTranscode( const int subStreamIndex )
329
329
assert ( _frameBuffer != NULL );
330
330
assert ( _transform != NULL );
331
331
332
- CodedData data;
333
332
if ( _verbose )
334
333
std::cout << " transcode a frame " << std::endl;
335
334
335
+ // check offset
336
336
if ( _offset &&
337
337
_frameProcessed > _offset &&
338
338
! _offsetPassed &&
@@ -348,6 +348,7 @@ bool StreamTranscoder::processTranscode( const int subStreamIndex )
348
348
else
349
349
decodingStatus = _currentDecoder->decodeNextFrame ( *_sourceBuffer, subStreamIndex );
350
350
351
+ CodedData data;
351
352
if ( decodingStatus )
352
353
{
353
354
if ( _verbose )
@@ -375,7 +376,6 @@ bool StreamTranscoder::processTranscode( const int subStreamIndex )
375
376
std::cout << " wrap (" << data.getSize () << " bytes)" << std::endl;
376
377
377
378
IOutputStream::EWrappingStatus wrappingStatus = _outputStream->wrap ( data );
378
-
379
379
switch ( wrappingStatus )
380
380
{
381
381
case IOutputStream::eWrappingSuccess:
Original file line number Diff line number Diff line change @@ -79,18 +79,18 @@ class AvExport StreamTranscoder
79
79
bool processTranscode ( const int subStreamIndex = -1 ); // /< By default transcode all channels
80
80
81
81
private:
82
- IInputStream* _inputStream;
83
- IOutputStream* _outputStream;
82
+ IInputStream* _inputStream; // /< Input stream to read next packet (has link, no ownership)
83
+ IOutputStream* _outputStream; // /< Output stream to wrap next packet (has link, no ownership)
84
84
85
- Frame* _sourceBuffer;
86
- Frame* _frameBuffer;
85
+ Frame* _sourceBuffer; // /< Has ownership
86
+ Frame* _frameBuffer; // /< Has ownership
87
87
88
- IDecoder* _inputDecoder;
89
- IDecoder* _generator;
90
- IDecoder* _currentDecoder;
91
- IEncoder* _outputEncoder;
88
+ IDecoder* _inputDecoder; // /< Decoder of packets read from _inputStream (has ownership)
89
+ IDecoder* _generator; // /< Generator of audio or video packets (has ownership)
90
+ IDecoder* _currentDecoder; // /< Link to _inputDecoder or _generator
91
+ IEncoder* _outputEncoder; // /< Encoder of packets which will be wrapped by _outputStream (has ownership)
92
92
93
- ITransform* _transform;
93
+ ITransform* _transform; // /< Video or audio transform (has ownership)
94
94
95
95
int _subStreamIndex; // /< Index of channel that is processed from the input stream (-1 if no demultiplexing).
96
96
Original file line number Diff line number Diff line change @@ -172,16 +172,15 @@ class AvExport Transcoder
172
172
void manageInfinityStreamFromProcessMethod ();
173
173
174
174
private:
175
- IOutputFile& _outputFile; // /< The output media file after process.
176
- std::vector< InputFile* > _inputFiles; // /< The list of input files which contain added streams.
175
+ IOutputFile& _outputFile; // /< The output media file after process (has link)
176
+ std::vector< InputFile* > _inputFiles; // /< The list of input files which contain added streams (has ownership)
177
177
178
178
std::vector< StreamTranscoder* > _streamTranscoders; // /< All streams of the output media file after process.
179
- std::vector< StreamTranscoder* > _streamTranscodersAllocated; // /< Streams allocated inside the Transcoder.
179
+ std::vector< StreamTranscoder* > _streamTranscodersAllocated; // /< Streams allocated inside the Transcoder (has ownership)
180
180
181
181
ProfileLoader _profileLoader; // /< Objet to get existing profiles, and add new ones for the Transcoder.
182
182
183
- EProcessMethod _eProcessMethod;
184
-
183
+ EProcessMethod _eProcessMethod; // /< Transcoding policy
185
184
size_t _mainStreamIndex; // /< Index of stream used to stop the process of transcode in case of eProcessMethodBasedOnStream.
186
185
187
186
bool _verbose;
You can’t perform that action at this time.
0 commit comments