Skip to content

Commit 3256bee

Browse files
author
Clement Champetier
committed
InputFile: rename getFormatContext to getAVFormatContext
Prefix "AV" to functions which call libav functions.
1 parent 19738bb commit 3256bee

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

app/optionChecker/optionChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void optionChecker( const std::string& inputfilename )
6868
avtranscoder::InputFile file( inputfilename );
6969

7070
// format options
71-
avtranscoder::Context formatContext( &file.getFormatContext() );
71+
avtranscoder::Context formatContext( &file.getAVFormatContext() );
7272
std::vector<avtranscoder::Option> formatOptions = formatContext.getOptions();
7373
displayOptions( formatOptions );
7474

src/AvTranscoder/codedStream/AvInputStream.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ AvInputStream::AvInputStream( InputFile& inputFile, const size_t streamIndex )
2121
, _streamIndex( streamIndex )
2222
, _isActivated( false )
2323
{
24-
AVCodecContext* context = _inputFile->getFormatContext().streams[_streamIndex]->codec;
24+
AVCodecContext* context = _inputFile->getAVFormatContext().streams[_streamIndex]->codec;
2525

2626
switch( context->codec_type )
2727
{
@@ -102,7 +102,7 @@ void AvInputStream::addPacket( AVPacket& packet )
102102

103103
VideoCodec& AvInputStream::getVideoCodec()
104104
{
105-
assert( _streamIndex <= _inputFile->getFormatContext().nb_streams );
105+
assert( _streamIndex <= _inputFile->getAVFormatContext().nb_streams );
106106

107107
if( getAVStream()->codec->codec_type != AVMEDIA_TYPE_VIDEO )
108108
{
@@ -114,7 +114,7 @@ VideoCodec& AvInputStream::getVideoCodec()
114114

115115
AudioCodec& AvInputStream::getAudioCodec()
116116
{
117-
assert( _streamIndex <= _inputFile->getFormatContext().nb_streams );
117+
assert( _streamIndex <= _inputFile->getAVFormatContext().nb_streams );
118118

119119
if( getAVStream()->codec->codec_type != AVMEDIA_TYPE_AUDIO )
120120
{
@@ -126,7 +126,7 @@ AudioCodec& AvInputStream::getAudioCodec()
126126

127127
DataCodec& AvInputStream::getDataCodec()
128128
{
129-
assert( _streamIndex <= _inputFile->getFormatContext().nb_streams );
129+
assert( _streamIndex <= _inputFile->getAVFormatContext().nb_streams );
130130

131131
if( getAVStream()->codec->codec_type != AVMEDIA_TYPE_DATA )
132132
{
@@ -143,7 +143,7 @@ AVMediaType AvInputStream::getStreamType() const
143143

144144
double AvInputStream::getDuration() const
145145
{
146-
return 1.0 * _inputFile->getFormatContext().duration / AV_TIME_BASE;
146+
return 1.0 * _inputFile->getAVFormatContext().duration / AV_TIME_BASE;
147147
}
148148

149149
void AvInputStream::clearBuffering()
@@ -153,7 +153,7 @@ void AvInputStream::clearBuffering()
153153

154154
AVStream* AvInputStream::getAVStream() const
155155
{
156-
return _inputFile->getFormatContext().streams[_streamIndex];
156+
return _inputFile->getAVFormatContext().streams[_streamIndex];
157157
}
158158

159159
}

src/AvTranscoder/file/InputFile.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class AvExport InputFile
7474
* @brief Get LibAV/FFmpeg AVFormatContext
7575
* @return format context on current InputFile
7676
**/
77-
AVFormatContext& getFormatContext() const { return *_formatContext; }
77+
AVFormatContext& getAVFormatContext() const { return *_formatContext; }
7878

7979
/**
8080
* @brief Read the next packet of the specified stream

0 commit comments

Comments
 (0)