void IVACloud::GetVideoSize() { TCHAR lpAppDataPath[260]; SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, lpAppDataPath); scat_n(lpAppDataPath, TEXT("\\OBS"), 4); ConfigFile *GlobalConfig = new ConfigFile; String strGlobalIni; strGlobalIni << lpAppDataPath << TEXT("\\global.ini"); GlobalConfig->Open(strGlobalIni); String strProfile = GlobalConfig->GetString(TEXT("General"), TEXT("Profile")); String strProfileIni; strProfileIni << lpAppDataPath << TEXT("\\profiles\\") << strProfile << TEXT(".ini"); ConfigFile *ProfileConfig = new ConfigFile; ProfileConfig->Open(strProfileIni); m_nVideoWidth = ProfileConfig->GetInt(TEXT("Video"), TEXT("BaseWidth")); m_nVideoHeight = ProfileConfig->GetInt(TEXT("Video"), TEXT("BaseHeight")); ProfileConfig->Close(); delete ProfileConfig; GlobalConfig->Close(); delete GlobalConfig; }
String IVACloud::GetRtmpStr() { TCHAR lpAppDataPath[260]; SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, lpAppDataPath); scat_n(lpAppDataPath, TEXT("\\OBS"), 4); ConfigFile *GlobalConfig = new ConfigFile; String strGlobalIni; strGlobalIni << lpAppDataPath << TEXT("\\global.ini"); GlobalConfig->Open(strGlobalIni); String strProfile = GlobalConfig->GetString(TEXT("General"), TEXT("Profile")); String strProfileIni; strProfileIni << lpAppDataPath << TEXT("\\profiles\\") << strProfile << TEXT(".ini"); ConfigFile *ProfileConfig = new ConfigFile; ProfileConfig->Open(strProfileIni); String strRtmp, strUrl, strChn; strUrl = ProfileConfig->GetString(TEXT("Publish"), TEXT("URL")); strChn = ProfileConfig->GetString(TEXT("Publish"), TEXT("PlayPath")); strRtmp << strUrl << TEXT("/") << strChn; ProfileConfig->Close(); delete ProfileConfig; GlobalConfig->Close(); delete GlobalConfig; return strRtmp; }
void UnloadPlugin() { delete pluginLocale; config.Close(); }