mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
faf0866f1b | ||
|
228afd3405 | ||
|
0548c7798a | ||
|
6c9fd55c63 | ||
![]() |
7e3f2a82f0 | ||
|
65396e1db7 | ||
|
f8bc7c4f59 | ||
|
9e48274617 |
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16...3.25)
|
||||
|
||||
legacy_check()
|
||||
|
||||
set(obs-websocket_VERSION 5.5.0)
|
||||
set(obs-websocket_VERSION 5.5.2)
|
||||
set(OBS_WEBSOCKET_RPC_VERSION 1)
|
||||
|
||||
include(cmake/obs-websocket-api.cmake)
|
||||
@ -138,12 +138,14 @@ target_compile_definitions(
|
||||
target_compile_options(
|
||||
obs-websocket
|
||||
PRIVATE $<$<PLATFORM_ID:Windows>:/wd4267>
|
||||
$<$<PLATFORM_ID:Windows>:/wd4996>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU,AppleClang,Clang>:-Wall>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU,AppleClang,Clang>:-Wno-error=float-conversion>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU,AppleClang,Clang>:-Wno-error=shadow>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-error=format-overflow>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-error=int-conversion>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-error=comment>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-error=deprecated-declarations>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-error=null-pointer-subtraction>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-error=deprecated-declarations>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-error=implicit-int-conversion>
|
||||
|
@ -1,4 +1,4 @@
|
||||
project(obs-websocket VERSION 5.5.0)
|
||||
project(obs-websocket VERSION 5.5.2)
|
||||
set(OBS_WEBSOCKET_RPC_VERSION 1)
|
||||
|
||||
option(ENABLE_WEBSOCKET "Enable building OBS with websocket plugin" ON)
|
||||
|
@ -12,7 +12,7 @@ OBSWebSocket.Settings.GeneratePassword="Generează parola"
|
||||
OBSWebSocket.Settings.ServerPort="Portul serverului"
|
||||
OBSWebSocket.Settings.ShowConnectInfo="Afișează informațiile conexiunii"
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningTitle="Avertisment: În prezent în direct"
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningMessage="Se pare că un output (transmisiune, înregistrare etc.) este activ în prezent."
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningMessage="Se pare că un output (stream, înregistrare etc.) este activ în prezent."
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningInfoText="Sigur vrei să afișezi informațiile de conectare?"
|
||||
OBSWebSocket.Settings.Save.UserPasswordWarningTitle="Avertisment: Potențială problemă de securitate"
|
||||
OBSWebSocket.Settings.Save.UserPasswordWarningMessage="obs-websocket stochează parola serverului ca text simplu. Este foarte recomandat să folosiți o parolă generată de obs-websocket."
|
||||
|
@ -1,6 +1,6 @@
|
||||
OBSWebSocket.Plugin.Description="Fjärrkontroll av OBS Studio via WebSocket"
|
||||
OBSWebSocket.Settings.DialogTitle="WebSocket-serverinställningar"
|
||||
OBSWebSocket.Settings.PluginSettingsTitle="Insticksmodulsinställningar"
|
||||
OBSWebSocket.Settings.PluginSettingsTitle="Insticksprogramsinställningar"
|
||||
OBSWebSocket.Settings.ServerEnable="Aktivera WebSocket-server"
|
||||
OBSWebSocket.Settings.AlertsEnable="Aktivera systemfältsmeddelanden"
|
||||
OBSWebSocket.Settings.DebugEnable="Aktivera felsökningsloggning"
|
||||
@ -11,7 +11,7 @@ OBSWebSocket.Settings.Password="Serverlösenord"
|
||||
OBSWebSocket.Settings.GeneratePassword="Generera lösenord"
|
||||
OBSWebSocket.Settings.ServerPort="Serverport"
|
||||
OBSWebSocket.Settings.ShowConnectInfo="Visa anslutningsinformation"
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningTitle="Varning: Sänder för närvarande"
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningTitle="Varning: Direktsändning pågår"
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningMessage="Det verkar som om en utmatning (ström, inspelning, etc.) är för närvarande aktiv."
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningInfoText="Är du säker på att du vill visa din anslutningsinformation?"
|
||||
OBSWebSocket.Settings.Save.UserPasswordWarningTitle="Varning: Potentiellt säkerhetsproblem"
|
||||
|
@ -87,6 +87,10 @@ void Config::Load(json config)
|
||||
Save();
|
||||
}
|
||||
|
||||
// If there are migrated settings, write them to disk before processing arguments.
|
||||
if (!config.empty())
|
||||
Save();
|
||||
|
||||
// Process `--websocket_port` override
|
||||
QString portArgument = Utils::Platform::GetCommandLineArgument(CMDLINE_WEBSOCKET_PORT);
|
||||
if (portArgument != "") {
|
||||
@ -141,7 +145,9 @@ void Config::Save()
|
||||
config[PARAM_PASSWORD] = ServerPassword;
|
||||
}
|
||||
|
||||
if (!Utils::Json::SetJsonFileContent(configFilePath, config))
|
||||
if (Utils::Json::SetJsonFileContent(configFilePath, config))
|
||||
blog(LOG_DEBUG, "[Config::Save] Saved config.");
|
||||
else
|
||||
blog(LOG_ERROR, "[Config::Save] Failed to write config file!");
|
||||
}
|
||||
|
||||
@ -193,7 +199,7 @@ bool MigratePersistentData()
|
||||
std::error_code ec;
|
||||
|
||||
// Ensure module config directory exists
|
||||
std::string moduleConfigDirectory = Utils::Obs::StringHelper::GetModuleConfigPath("");
|
||||
auto moduleConfigDirectory = std::filesystem::u8path(Utils::Obs::StringHelper::GetModuleConfigPath(""));
|
||||
if (!std::filesystem::exists(moduleConfigDirectory, ec))
|
||||
std::filesystem::create_directories(moduleConfigDirectory, ec);
|
||||
if (ec) {
|
||||
@ -203,10 +209,11 @@ bool MigratePersistentData()
|
||||
}
|
||||
|
||||
// Move any existing persistent data to module config directory, then delete old file
|
||||
std::string oldPersistentDataPath =
|
||||
Utils::Obs::StringHelper::GetCurrentProfilePath() + "/../../../obsWebSocketPersistentData.json";
|
||||
auto oldPersistentDataPath = std::filesystem::u8path(Utils::Obs::StringHelper::GetCurrentProfilePath() +
|
||||
"/../../../obsWebSocketPersistentData.json");
|
||||
if (std::filesystem::exists(oldPersistentDataPath, ec)) {
|
||||
std::string persistentDataPath = Utils::Obs::StringHelper::GetModuleConfigPath("persistent_data.json");
|
||||
auto persistentDataPath =
|
||||
std::filesystem::u8path(Utils::Obs::StringHelper::GetModuleConfigPath("persistent_data.json"));
|
||||
std::filesystem::copy_file(oldPersistentDataPath, persistentDataPath, ec);
|
||||
std::filesystem::remove(oldPersistentDataPath, ec);
|
||||
blog(LOG_INFO, "[MigratePersistentData] Persistent data migrated to new path");
|
||||
|
@ -21,11 +21,8 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
|
||||
static bool VirtualCamAvailable()
|
||||
{
|
||||
OBSDataAutoRelease privateData = obs_get_private_data();
|
||||
if (!privateData)
|
||||
return false;
|
||||
|
||||
return obs_data_get_bool(privateData, "vcamEnabled");
|
||||
OBSOutputAutoRelease output = obs_frontend_get_virtualcam_output();
|
||||
return output != nullptr;
|
||||
}
|
||||
|
||||
static bool ReplayBufferAvailable()
|
||||
|
Loading…
x
Reference in New Issue
Block a user