mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-25 18:30:53 +00:00
Changed: #964 Allow setting hls info dir in panoply config.
This commit is contained in:
parent
0bcbebcb41
commit
e759674bec
1 changed files with 15 additions and 4 deletions
|
@ -38,7 +38,7 @@ using namespace std;
|
||||||
|
|
||||||
|
|
||||||
string DivideBy2Dir= "/d4/";
|
string DivideBy2Dir= "/d4/";
|
||||||
string HlsInfoDir= "hlsInfo/";
|
//string HlsInfoDir= "hlsInfo/";
|
||||||
|
|
||||||
|
|
||||||
// ========================================================================================================
|
// ========================================================================================================
|
||||||
|
@ -57,6 +57,7 @@ struct CBuildInfo
|
||||||
{
|
{
|
||||||
std::string InputPath;
|
std::string InputPath;
|
||||||
std::string OutputPath;
|
std::string OutputPath;
|
||||||
|
std::string HlsInfoPath;
|
||||||
std::string CachePath;
|
std::string CachePath;
|
||||||
std::vector<std::string> BitmapExtensions; // the supported extension for bitmaps
|
std::vector<std::string> BitmapExtensions; // the supported extension for bitmaps
|
||||||
std::string OutputFormat; // png or tga
|
std::string OutputFormat; // png or tga
|
||||||
|
@ -277,6 +278,16 @@ int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// hls info path
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bi.HlsInfoPath = NLMISC::CPath::standardizePath(cf.getVar("hls_info_path").asString());
|
||||||
|
}
|
||||||
|
catch (NLMISC::EUnknownVar &)
|
||||||
|
{
|
||||||
|
bi.HlsInfoPath = "hlsInfo/";
|
||||||
|
}
|
||||||
|
|
||||||
/// output
|
/// output
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -533,7 +544,7 @@ static bool CheckIfNeedRebuildColoredVersionForOneBitmap(const CBuildInfo &bi, c
|
||||||
}
|
}
|
||||||
|
|
||||||
// get hls info version that is in the cache. if not possible, must rebuild
|
// get hls info version that is in the cache. if not possible, must rebuild
|
||||||
std::string outputHLSInfo = HlsInfoDir + fileName + ".hlsinfo";
|
std::string outputHLSInfo = bi.HlsInfoPath + fileName + ".hlsinfo";
|
||||||
std::string cacheHLSInfo = bi.CachePath + fileName + ".hlsinfo";
|
std::string cacheHLSInfo = bi.CachePath + fileName + ".hlsinfo";
|
||||||
if (!NLMISC::CFile::fileExists(cacheHLSInfo.c_str()) )
|
if (!NLMISC::CFile::fileExists(cacheHLSInfo.c_str()) )
|
||||||
return true;
|
return true;
|
||||||
|
@ -843,13 +854,13 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str
|
||||||
|
|
||||||
// **** save the TMP hlsInfo
|
// **** save the TMP hlsInfo
|
||||||
NLMISC::COFile os;
|
NLMISC::COFile os;
|
||||||
if (os.open(HlsInfoDir + fileName + ".hlsinfo"))
|
if (os.open(bi.HlsInfoPath + fileName + ".hlsinfo"))
|
||||||
{
|
{
|
||||||
os.serial(hlsInfo);
|
os.serial(hlsInfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlwarning(("Couldn't write " + HlsInfoDir + fileName + ".hlsinfo").c_str());
|
nlwarning(("Couldn't write " + bi.HlsInfoPath + fileName + ".hlsinfo").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue