Skip to content

Commit 1c0fa46

Browse files
author
Clement Champetier
committed
getDuration: add documentation
Indicate that the duration is in seconds.
1 parent 78eb624 commit 1c0fa46

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

src/AvTranscoder/file/FormatContext.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class AvExport FormatContext
5858
AVStream& addAVStream( const AVCodec& avCodec );
5959

6060
size_t getNbStreams() const { return _avFormatContext->nb_streams; }
61+
/// Get duration of the program, in seconds
6162
size_t getDuration() const { return _avFormatContext->duration; }
6263
size_t getStartTime() const { return _avFormatContext->start_time; }
6364

src/AvTranscoder/stream/InputStream.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class AvExport InputStream : public IInputStream
2222
bool readNextPacket( CodedData& data );
2323

2424
size_t getStreamIndex() const { return _streamIndex; }
25+
/// Get duration of the stream, in seconds
2526
double getDuration() const;
2627
AVMediaType getStreamType() const;
2728

src/AvTranscoder/transcoder/StreamTranscoder.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class AvExport StreamTranscoder
6060
//@}
6161

6262
/**
63-
* @brief Get the duration of the stream.
63+
* @brief Get the duration of the stream, in seconds
6464
* @note if it's a generated stream, return limit of double.
6565
*/
6666
double getDuration() const;
@@ -98,7 +98,7 @@ class AvExport StreamTranscoder
9898

9999
int _subStreamIndex; ///< Index of channel that is processed from the input stream (-1 if no demultiplexing).
100100

101-
size_t _frameProcessed; ///< How many frame processed for this StreamTranscoder.
101+
size_t _frameProcessed; ///< How many frames have been processed by the StreamTranscoder.
102102
size_t _offset; ///< Offset, in frame, at the beginning of the StreamTranscoder.
103103

104104
bool _takeFromGenerator; ///< Is the data processed are taken from a generator.

src/AvTranscoder/transcoder/Transcoder.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,18 @@ class AvExport Transcoder
145145
InputFile* addInputFile( const std::string& filename, const size_t streamIndex );
146146

147147
/**
148-
* @brief Get the duration of the stream.
148+
* @brief Get the duration of the stream, in seconds
149149
* @note If the stream is a generator, return limit of double.
150150
*/
151151
double getStreamDuration( size_t indexStream ) const;
152152

153153
/**
154-
* @brief Get the duration of the shortest stream.
154+
* @brief Get the duration of the shortest stream, in seconds
155155
*/
156156
double getMinTotalDuration() const;
157157

158158
/**
159-
* @brief Get the duration of the longest stream.
159+
* @brief Get the duration of the longest stream, in seconds
160160
*/
161161
double getMaxTotalDuration() const;
162162

0 commit comments

Comments
 (0)