AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
#include <VideoProperties.hpp>
Public Member Functions | |
VideoProperties (const FormatContext &formatContext, const size_t index, IProgress &progress, const EAnalyseLevel level=eAnalyseLevelFirstGop) | |
std::string | getProfileName () const |
std::string | getColorTransfert () const |
std::string | getColorspace () const |
std::string | getColorRange () const |
std::string | getColorPrimaries () const |
std::string | getChromaSampleLocation () const |
std::string | getFieldOrder () const |
PixelProperties & | getPixelProperties () |
int64_t | getStartTimecode () const |
std::string | getStartTimecodeString () const |
Rational | getSar () const |
Rational | getDar () const |
size_t | getBitRate () const |
in bits/s More... | |
size_t | getMaxBitRate () const |
size_t | getMinBitRate () const |
size_t | getNbFrames () const |
size_t | getTicksPerFrame () const |
size_t | getWidth () const |
size_t | getHeight () const |
size_t | getDtgActiveFormat () const |
size_t | getReferencesFrames () const |
int | getProfile () const |
int | getLevel () const |
float | getFps () const |
Corresponds to the 'fps' returned by ffprobe. fps = the average framerate that has come from the AVStream tbn = the time base in AVStream that has come from the AVStream tbc = the time base in AVCodecContext for the codec used for a particular stream tbr = tbr is guessed from the video stream and is the value users want to see when they look for the video frame rate. More... | |
bool | hasBFrames () const |
AVCodecContext & | getAVCodecContext () |
const PixelProperties & | getPixelProperties () const |
PropertyVector & | fillVector (PropertyVector &data) const |
To avoid copy of the vector. More... | |
bool | isInterlaced () const |
bool | isTopFieldFirst () const |
size_t | getGopSize () const |
std::vector< std::pair< char, int > > | getGopStructure () const |
![]() | |
StreamProperties (const FormatContext &formatContext, const size_t index) | |
virtual | ~StreamProperties ()=0 |
size_t | getStreamIndex () const |
size_t | getStreamId () const |
Rational | getTimeBase () const |
float | getDuration () const |
in seconds More... | |
AVMediaType | getStreamType () const |
size_t | getCodecId () const |
std::string | getCodecName () const |
std::string | getCodecLongName () const |
const PropertyVector & | getMetadatas () const |
const AVFormatContext & | getAVFormatContext () const |
std::string | asJson () const |
Return all properties as a json format. More... | |
PropertyMap | asMap () const |
Return all properties as a map (name of property, value) More... | |
PropertyVector | asVector () const |
Same data with a specific order. More... | |
Private Member Functions | |
void | analyseGopStructure (IProgress &progress) |
frame type / is key frame More... | |
template<typename T > | |
void | addProperty (PropertyVector &dataVector, const std::string &key, T(VideoProperties::*getter)(void) const) const |
Private Attributes | |
EAnalyseLevel | _levelAnalysis |
Level of analysis asked. More... | |
PixelProperties | _pixelProperties |
All the pixel properties contained in this stream. More... | |
int64_t | _firstGopTimeCode |
GOP timecode of the first frame. More... | |
bool | _isInterlaced |
bool | _isTopFieldFirst |
size_t | _gopSize |
std::vector< std::pair< char, int > > | _gopStructure |
picture type, encoded frame size in bytes More... | |
Additional Inherited Members | |
![]() | |
const AVFormatContext * | _formatContext |
Has link (no ownership) More... | |
AVCodecContext * | _codecContext |
Has link (no ownership) More... | |
AVCodec * | _codec |
Has link (no ownership) More... | |
size_t | _streamIndex |
PropertyVector | _metadatas |
Definition at line 21 of file VideoProperties.hpp.
avtranscoder::VideoProperties::VideoProperties | ( | const FormatContext & | formatContext, |
const size_t | index, | ||
IProgress & | progress, | ||
const EAnalyseLevel | level = eAnalyseLevelFirstGop |
||
) |
Definition at line 20 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext, _firstGopTimeCode, _levelAnalysis, _pixelProperties, analyseGopStructure(), and avtranscoder::eAnalyseLevelFirstGop.
|
inlineprivate |
Definition at line 96 of file VideoProperties.hpp.
References avtranscoder::detail::add(), and avtranscoder::detail::propertyValueIfError.
Referenced by fillVector().
|
private |
frame type / is key frame
progress | callback to get analysis progression |
Definition at line 470 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codec, avtranscoder::StreamProperties::_codecContext, avtranscoder::StreamProperties::_formatContext, _gopSize, _gopStructure, _isInterlaced, _isTopFieldFirst, avtranscoder::StreamProperties::_streamIndex, avtranscoder::Frame::getAVFrame(), and avtranscoder::Frame::getEncodedSize().
Referenced by VideoProperties().
|
virtual |
To avoid copy of the vector.
Reimplemented from avtranscoder::StreamProperties.
Definition at line 535 of file VideoProperties.cpp.
References _gopStructure, _levelAnalysis, _pixelProperties, avtranscoder::detail::add(), addProperty(), avtranscoder::eAnalyseLevelFirstGop, avtranscoder::StreamProperties::fillVector(), avtranscoder::PixelProperties::fillVector(), getBitRate(), getChromaSampleLocation(), getColorPrimaries(), getColorRange(), getColorspace(), getColorTransfert(), getDar(), getDtgActiveFormat(), getFieldOrder(), getFps(), getGopSize(), getHeight(), getLevel(), getMaxBitRate(), getMinBitRate(), getNbFrames(), getProfile(), getProfileName(), getReferencesFrames(), getSar(), getStartTimecodeString(), getTicksPerFrame(), getWidth(), hasBFrames(), isInterlaced(), isTopFieldFirst(), and avtranscoder::detail::propertyValueIfError.
|
inline |
Definition at line 81 of file VideoProperties.hpp.
Referenced by main().
size_t avtranscoder::VideoProperties::getBitRate | ( | ) | const |
in bits/s
Definition at line 321 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codec, avtranscoder::StreamProperties::_codecContext, avtranscoder::StreamProperties::_formatContext, _levelAnalysis, avtranscoder::StreamProperties::_streamIndex, avtranscoder::eAnalyseLevelFirstGop, avtranscoder::Frame::getAVFrame(), avtranscoder::Frame::getEncodedSize(), getFps(), and getGopSize().
Referenced by fillVector().
std::string avtranscoder::VideoProperties::getChromaSampleLocation | ( | ) | const |
Definition at line 219 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
std::string avtranscoder::VideoProperties::getColorPrimaries | ( | ) | const |
Definition at line 185 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
std::string avtranscoder::VideoProperties::getColorRange | ( | ) | const |
Definition at line 165 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
std::string avtranscoder::VideoProperties::getColorspace | ( | ) | const |
Definition at line 120 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
std::string avtranscoder::VideoProperties::getColorTransfert | ( | ) | const |
Definition at line 56 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
Rational avtranscoder::VideoProperties::getDar | ( | ) | const |
Definition at line 307 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext, and getSar().
Referenced by fillVector().
size_t avtranscoder::VideoProperties::getDtgActiveFormat | ( | ) | const |
Definition at line 421 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
std::string avtranscoder::VideoProperties::getFieldOrder | ( | ) | const |
Definition at line 247 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
float avtranscoder::VideoProperties::getFps | ( | ) | const |
Corresponds to the 'fps' returned by ffprobe. fps = the average framerate that has come from the AVStream tbn = the time base in AVStream that has come from the AVStream tbc = the time base in AVCodecContext for the codec used for a particular stream tbr = tbr is guessed from the video stream and is the value users want to see when they look for the video frame rate.
Definition at line 449 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_formatContext, and avtranscoder::StreamProperties::_streamIndex.
Referenced by fillVector(), getBitRate(), getNbFrames(), and avtranscoder::Transcoder::getProfileFromFile().
|
inline |
Definition at line 76 of file VideoProperties.hpp.
Referenced by fillVector(), and getBitRate().
|
inline |
Definition at line 77 of file VideoProperties.hpp.
size_t avtranscoder::VideoProperties::getHeight | ( | ) | const |
Definition at line 414 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector(), and avtranscoder::Transcoder::getProfileFromFile().
int avtranscoder::VideoProperties::getLevel | ( | ) | const |
Definition at line 442 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
size_t avtranscoder::VideoProperties::getMaxBitRate | ( | ) | const |
Definition at line 376 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
size_t avtranscoder::VideoProperties::getMinBitRate | ( | ) | const |
Definition at line 383 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
size_t avtranscoder::VideoProperties::getNbFrames | ( | ) | const |
Definition at line 390 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_formatContext, avtranscoder::StreamProperties::_streamIndex, avtranscoder::StreamProperties::getDuration(), and getFps().
Referenced by fillVector().
|
inline |
Definition at line 35 of file VideoProperties.hpp.
Referenced by avtranscoder::Transcoder::getProfileFromFile().
|
inline |
Definition at line 82 of file VideoProperties.hpp.
int avtranscoder::VideoProperties::getProfile | ( | ) | const |
Definition at line 435 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector(), and getProfileName().
std::string avtranscoder::VideoProperties::getProfileName | ( | ) | const |
Definition at line 41 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codec, avtranscoder::StreamProperties::_codecContext, and getProfile().
Referenced by fillVector().
size_t avtranscoder::VideoProperties::getReferencesFrames | ( | ) | const |
Definition at line 428 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
Rational avtranscoder::VideoProperties::getSar | ( | ) | const |
Definition at line 296 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector(), and getDar().
int64_t avtranscoder::VideoProperties::getStartTimecode | ( | ) | const |
Definition at line 271 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext, and _firstGopTimeCode.
Referenced by getStartTimecodeString().
std::string avtranscoder::VideoProperties::getStartTimecodeString | ( | ) | const |
Definition at line 278 of file VideoProperties.cpp.
References getStartTimecode().
Referenced by fillVector().
size_t avtranscoder::VideoProperties::getTicksPerFrame | ( | ) | const |
Definition at line 400 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
size_t avtranscoder::VideoProperties::getWidth | ( | ) | const |
Definition at line 407 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector(), and avtranscoder::Transcoder::getProfileFromFile().
bool avtranscoder::VideoProperties::hasBFrames | ( | ) | const |
Definition at line 454 of file VideoProperties.cpp.
References avtranscoder::StreamProperties::_codecContext.
Referenced by fillVector().
|
inline |
Definition at line 71 of file VideoProperties.hpp.
Referenced by fillVector().
|
inline |
Definition at line 72 of file VideoProperties.hpp.
Referenced by fillVector().
|
private |
GOP timecode of the first frame.
Definition at line 132 of file VideoProperties.hpp.
Referenced by getStartTimecode(), and VideoProperties().
|
private |
Definition at line 124 of file VideoProperties.hpp.
Referenced by analyseGopStructure().
|
private |
picture type, encoded frame size in bytes
Definition at line 125 of file VideoProperties.hpp.
Referenced by analyseGopStructure(), and fillVector().
|
private |
Definition at line 122 of file VideoProperties.hpp.
Referenced by analyseGopStructure().
|
private |
Definition at line 123 of file VideoProperties.hpp.
Referenced by analyseGopStructure().
|
private |
Level of analysis asked.
Definition at line 113 of file VideoProperties.hpp.
Referenced by fillVector(), getBitRate(), and VideoProperties().
|
private |
All the pixel properties contained in this stream.
Definition at line 118 of file VideoProperties.hpp.
Referenced by fillVector(), and VideoProperties().