Skip to content

Commit 81bc92e

Browse files
author
Clement Champetier
committed
VideoProperties: updated value returned by getGopStructure
* Before: picture type, is key frame * After: picture type, encoded frame size in bytes * Note: "is key frame" info can be found using the picture type (I frame).
1 parent 68cc0dd commit 81bc92e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/AvTranscoder/properties/VideoProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ void VideoProperties::analyseGopStructure(IProgress& progress)
501501
AVFrame& avFrame = frame.getAVFrame();
502502

503503
_gopStructure.push_back(
504-
std::make_pair(av_get_picture_type_char(avFrame.pict_type), avFrame.key_frame));
504+
std::make_pair(av_get_picture_type_char(avFrame.pict_type), frame.getEncodedSize()));
505505
_isInterlaced = avFrame.interlaced_frame;
506506
_isTopFieldFirst = avFrame.top_field_first;
507507
if(avFrame.pict_type == AV_PICTURE_TYPE_I)

src/AvTranscoder/properties/VideoProperties.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class AvExport VideoProperties : public StreamProperties
7474
* @return the distance between two nearest I frame
7575
*/
7676
size_t getGopSize() const { return _gopSize; }
77-
std::vector<std::pair<char, bool> > getGopStructure() const { return _gopStructure; }
77+
std::vector<std::pair<char, int> > getGopStructure() const { return _gopStructure; }
7878
//@}
7979

8080
#ifndef SWIG
@@ -122,7 +122,7 @@ class AvExport VideoProperties : public StreamProperties
122122
bool _isInterlaced;
123123
bool _isTopFieldFirst;
124124
size_t _gopSize;
125-
std::vector<std::pair<char, bool> > _gopStructure;
125+
std::vector<std::pair<char, int> > _gopStructure; ///< picture type, encoded frame size in bytes
126126
//@}
127127

128128
/**

0 commit comments

Comments
 (0)