Skip to content

Commit e60015f

Browse files
author
Clement Champetier
committed
Transcoder: refactore getOutputDuration
1 parent bde8526 commit e60015f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/AvTranscoder/transcoder/Transcoder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ void Transcoder::process( IProgress& progress )
277277

278278
preProcessCodecLatency();
279279

280-
double totalDuration = getTotalDurationFromProcessMethod();
280+
double totalDuration = getOutputDuration();
281281

282282
size_t frame = 0;
283283
bool frameProcessed = true;
@@ -478,7 +478,7 @@ double Transcoder::getMaxTotalDuration() const
478478
return maxTotalDuration;
479479
}
480480

481-
double Transcoder::getTotalDurationFromProcessMethod() const
481+
double Transcoder::getOutputDuration() const
482482
{
483483
switch( _eProcessMethod )
484484
{

src/AvTranscoder/transcoder/Transcoder.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,26 +146,25 @@ class AvExport Transcoder
146146

147147
/**
148148
* @brief Get the duration of the stream.
149+
* @note If the stream is a generator, return limit of double.
149150
*/
150151
double getStreamDuration( size_t indexStream ) const;
151152

152153
/**
153154
* @brief Get the duration of the shortest stream.
154-
* @note if there is only generated streams, return limit of double.
155155
*/
156156
double getMinTotalDuration() const;
157157

158158
/**
159159
* @brief Get the duration of the longest stream.
160-
* @note if there is only generated streams, return limit of double.
161160
*/
162161
double getMaxTotalDuration() const;
163162

164163
/**
165164
* @brief Get the duration of the output program
166165
* @note Depends on the streams, the process method, and the main stream index.
167166
*/
168-
double getTotalDurationFromProcessMethod() const;
167+
double getOutputDuration() const;
169168

170169
/**
171170
* @brief Set for each StreamTranscoder if it is an infinity stream (switch to generator at the end of the stream).

0 commit comments

Comments
 (0)