Skip to content

Commit b731e36

Browse files
author
Clement Champetier
committed
AudioProperties: renamed getChannels to getNbChannels
1 parent 6e22c0a commit b731e36

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/AvTranscoder/mediaProperty/AudioProperties.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ size_t AudioProperties::getSampleRate() const
109109
return _codecContext->sample_rate;
110110
}
111111

112-
size_t AudioProperties::getChannels() const
112+
size_t AudioProperties::getNbChannels() const
113113
{
114114
if( ! _codecContext )
115115
throw std::runtime_error( "unknown codec context" );
@@ -136,7 +136,7 @@ size_t AudioProperties::getNbSamples() const
136136
throw std::runtime_error( "unknown format context" );
137137
size_t nbSamples = _formatContext->streams[_streamIndex]->nb_frames;
138138
if(nbSamples == 0)
139-
nbSamples = getSampleRate() * getChannels() * getDuration();
139+
nbSamples = getSampleRate() * getNbChannels() * getDuration();
140140
return nbSamples;
141141
}
142142

@@ -160,7 +160,7 @@ PropertyVector AudioProperties::getPropertiesAsVector() const
160160
addProperty( data, "sampleRate", &AudioProperties::getSampleRate );
161161
addProperty( data, "bitRate", &AudioProperties::getBitRate );
162162
addProperty( data, "nbSamples", &AudioProperties::getNbSamples );
163-
addProperty( data, "channels", &AudioProperties::getChannels );
163+
addProperty( data, "nbChannels", &AudioProperties::getNbChannels );
164164
addProperty( data, "channelLayout", &AudioProperties::getChannelLayout );
165165
addProperty( data, "channelName", &AudioProperties::getChannelName );
166166
addProperty( data, "channelDescription", &AudioProperties::getChannelDescription );

src/AvTranscoder/mediaProperty/AudioProperties.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AvExport AudioProperties : public StreamProperties
2020
std::string getChannelDescription() const;
2121

2222
size_t getSampleRate() const;
23-
size_t getChannels() const;
23+
size_t getNbChannels() const;
2424
size_t getBitRate() const; ///< 0 if unknown
2525
size_t getNbSamples() const;
2626

src/AvTranscoder/transcoder/Transcoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ ProfileLoader::Profile Transcoder::getProfileFromFile( InputFile& inputFile, con
428428
ss << audioProperties->getSampleRate();
429429
profile[ constants::avProfileSampleRate ] = ss.str();
430430
ss.str( "" );
431-
ss << audioProperties->getChannels();
431+
ss << audioProperties->getNbChannels();
432432
profile[ constants::avProfileChannel ] = ss.str();
433433
}
434434

0 commit comments

Comments
 (0)