Skip to content

Commit 19663c3

Browse files
author
Clement Champetier
committed
ProfileLoader: renamed 'loadProfile' methods to 'addProfile'
1 parent b81e198 commit 19663c3

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/AvTranscoder/profile/ProfileLoader.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ namespace avtranscoder
1212
ProfileLoader::ProfileLoader(const bool autoload)
1313
{
1414
if(autoload)
15-
loadProfiles();
15+
addProfiles();
1616
}
1717

18-
void ProfileLoader::loadProfile(const std::string& avProfileFileName)
18+
void ProfileLoader::addProfile(const std::string& avProfileFileName)
1919
{
2020
std::ifstream infile;
2121
infile.open(avProfileFileName.c_str(), std::ifstream::in);
@@ -30,10 +30,10 @@ void ProfileLoader::loadProfile(const std::string& avProfileFileName)
3030
if(keyValue.size() == 2)
3131
customProfile[keyValue.at(0)] = keyValue.at(1);
3232
}
33-
loadProfile(customProfile);
33+
addProfile(customProfile);
3434
}
3535

36-
void ProfileLoader::loadProfiles(const std::string& avProfilesPath)
36+
void ProfileLoader::addProfiles(const std::string& avProfilesPath)
3737
{
3838
std::string realAvProfilesPath = avProfilesPath;
3939
if(realAvProfilesPath.empty())
@@ -59,7 +59,7 @@ void ProfileLoader::loadProfiles(const std::string& avProfilesPath)
5959
const std::string absPath = (*dirIt) + "/" + (*fileIt);
6060
try
6161
{
62-
loadProfile(absPath);
62+
addProfile(absPath);
6363
}
6464
catch(const std::exception& e)
6565
{
@@ -69,7 +69,7 @@ void ProfileLoader::loadProfiles(const std::string& avProfilesPath)
6969
}
7070
}
7171

72-
void ProfileLoader::loadProfile(const Profile& profile)
72+
void ProfileLoader::addProfile(const Profile& profile)
7373
{
7474
// check profile identificator
7575
if(!profile.count(constants::avProfileIdentificator))

src/AvTranscoder/profile/ProfileLoader.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ class AvExport ProfileLoader
4545
ProfileLoader(const bool autoload = true);
4646

4747
/**
48-
* @brief Load profiles from files in avProfilesPath directory
48+
* @brief Add profiles from files in avProfilesPath directory
4949
* @param avProfilesPath: if empty, the path is replaced by value of AVPROFILES environment variable
5050
*/
51-
void loadProfiles(const std::string& avProfilesPath = "");
51+
void addProfiles(const std::string& avProfilesPath = "");
5252

5353
/**
54-
* @brief Load the profile defines in the given file
54+
* @brief Add the profile defines in the given file
5555
*/
56-
void loadProfile(const std::string& avProfileFileName);
56+
void addProfile(const std::string& avProfileFileName);
5757

5858
/**
59-
* @brief Load the given profile
59+
* @brief Add the given profile
6060
* @exception throw std::runtime_error if the profile is invalid
6161
*/
62-
void loadProfile(const Profile& profile);
62+
void addProfile(const Profile& profile);
6363

6464
bool hasProfile(const Profile& profile) const;
6565

src/AvTranscoder/transcoder/Transcoder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void Transcoder::addGeneratedStream(const ProfileLoader::Profile& encodingProfil
8787
{
8888
// Add profile
8989
if(!_profileLoader.hasProfile(encodingProfile))
90-
_profileLoader.loadProfile(encodingProfile);
90+
_profileLoader.addProfile(encodingProfile);
9191

9292
LOG_INFO("Add generated stream with encodingProfile=" << encodingProfile.at(constants::avProfileIdentificatorHuman))
9393

@@ -218,7 +218,7 @@ void Transcoder::addTranscodeStream(const std::vector<InputStreamDesc>& inputStr
218218
{
219219
// Add profile
220220
if(!_profileLoader.hasProfile(profile))
221-
_profileLoader.loadProfile(profile);
221+
_profileLoader.addProfile(profile);
222222

223223
std::stringstream sources;
224224
for(size_t index = 0; index < inputStreamDescArray.size(); ++index)

0 commit comments

Comments
 (0)