Skip to content

Commit a2eb377

Browse files
author
Clement Champetier
committed
Transcoder: renamed private method getOutputDuration to getExpectedOutputDuration
1 parent 087c3aa commit a2eb377

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/AvTranscoder/transcoder/Transcoder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ ProcessStat Transcoder::process( IProgress& progress )
258258

259259
preProcessCodecLatency();
260260

261-
const float outputDuration = getOutputDuration();
262-
LOG_INFO( "Output duration of the process will be " << outputDuration << "s." )
261+
const float expectedOutputDuration = getExpectedOutputDuration();
262+
LOG_INFO( "Output duration of the process will be " << expectedOutputDuration << "s." )
263263

264264
size_t frame = 0;
265265
bool frameProcessed = true;
@@ -268,16 +268,16 @@ ProcessStat Transcoder::process( IProgress& progress )
268268
const float progressDuration = getCurrentOutputDuration();
269269

270270
// check if JobStatusCancel
271-
if( progress.progress( ( progressDuration > outputDuration ) ? outputDuration : progressDuration, outputDuration ) == eJobStatusCancel )
271+
if( progress.progress( ( progressDuration > expectedOutputDuration ) ? expectedOutputDuration : progressDuration, expectedOutputDuration ) == eJobStatusCancel )
272272
{
273273
LOG_INFO( "End of process because the job was canceled." )
274274
break;
275275
}
276276

277277
// check progressDuration
278-
if( progressDuration >= outputDuration )
278+
if( progressDuration >= expectedOutputDuration )
279279
{
280-
LOG_INFO( "End of process because the output program duration (" << progressDuration << "s) is equal or upper than " << outputDuration << "s." )
280+
std::cout << "End of process because the output program duration (" << progressDuration << "s) is equal or upper than " << expectedOutputDuration << "s." << std::endl;
281281
break;
282282
}
283283

@@ -482,7 +482,7 @@ float Transcoder::getMaxTotalDuration() const
482482
return maxTotalDuration;
483483
}
484484

485-
float Transcoder::getOutputDuration() const
485+
float Transcoder::getExpectedOutputDuration() const
486486
{
487487
switch( _eProcessMethod )
488488
{

src/AvTranscoder/transcoder/Transcoder.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ class AvExport Transcoder
180180
float getMaxTotalDuration() const;
181181

182182
/**
183-
* @brief Get the duration of the output program
183+
* @brief Get the expected duration of the output program
184184
* @note Depends on the streams, the process method, and the main stream index.
185185
*/
186-
float getOutputDuration() const;
186+
float getExpectedOutputDuration() const;
187187

188188
/**
189189
* @brief Get the current duration of the output program

0 commit comments

Comments
 (0)