Skip to content

Commit fdc39f7

Browse files
committed
Merge pull request #91 from cchampet/dev_addDefaultAVPROFILES
ProfileLoader: add a default profiles location
2 parents f87a797 + dfb1db7 commit fdc39f7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ add_definitions(-DAVTRANSCODER_VERSION_MAJOR=${AVTRANSCODER_VERSION_MAJOR})
1313
add_definitions(-DAVTRANSCODER_VERSION_MINOR=${AVTRANSCODER_VERSION_MINOR})
1414
add_definitions(-DAVTRANSCODER_VERSION_MICRO=${AVTRANSCODER_VERSION_MICRO})
1515

16+
# Define AvTranscoder default path to profiles
17+
add_definitions(-DAVTRANSCODER_DEFAULT_AVPROFILES="${CMAKE_INSTALL_PREFIX}/share/ressource")
18+
1619
# Diplay commands being ran by CMake
1720
set(CMAKE_VERBOSE_MAKEFILE OFF)
1821

src/AvTranscoder/ProfileLoader.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ void ProfileLoader::loadProfiles( const std::string& avProfilesPath )
4040
std::string realAvProfilesPath = avProfilesPath;
4141
if( realAvProfilesPath.empty() )
4242
{
43+
// get custom profiles location from AVPROFILES environment variable
4344
if( std::getenv( "AVPROFILES" ) )
4445
realAvProfilesPath = std::getenv( "AVPROFILES" );
46+
// else get default profiles location
4547
else
46-
return;
48+
realAvProfilesPath = AVTRANSCODER_DEFAULT_AVPROFILES;
4749
}
4850

4951
std::vector< std::string > paths;

0 commit comments

Comments
 (0)