mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
6ef055a369 | |||
a4ee9c03ea | |||
9912c9963c | |||
21886adb32 | |||
c85d9143a9 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,7 +2,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
**.generated.h
|
|
||||||
/build/
|
/build/
|
||||||
/build32/
|
/build32/
|
||||||
/build64/
|
/build64/
|
||||||
@ -10,5 +9,4 @@
|
|||||||
/package/
|
/package/
|
||||||
/installer/Output/
|
/installer/Output/
|
||||||
/docs/node_modules/
|
/docs/node_modules/
|
||||||
/installer/installer-windows.generated.iss
|
|
||||||
/cmake-build-debug/
|
/cmake-build-debug/
|
||||||
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16...3.25)
|
|||||||
|
|
||||||
legacy_check()
|
legacy_check()
|
||||||
|
|
||||||
set(obs-websocket_VERSION 5.2.0)
|
set(obs-websocket_VERSION 5.2.2)
|
||||||
set(OBS_WEBSOCKET_RPC_VERSION 1)
|
set(OBS_WEBSOCKET_RPC_VERSION 1)
|
||||||
|
|
||||||
option(ENABLE_WEBSOCKET "Enable building OBS with websocket plugin" ON)
|
option(ENABLE_WEBSOCKET "Enable building OBS with websocket plugin" ON)
|
||||||
@ -127,8 +127,8 @@ target_sources(
|
|||||||
|
|
||||||
target_sources(obs-websocket PRIVATE deps/qr/cpp/QrCode.cpp deps/qr/cpp/QrCode.hpp)
|
target_sources(obs-websocket PRIVATE deps/qr/cpp/QrCode.cpp deps/qr/cpp/QrCode.hpp)
|
||||||
|
|
||||||
configure_file(src/plugin-macros.h.in src/plugin-macros.generated.h)
|
configure_file(src/plugin-macros.h.in plugin-macros.generated.h)
|
||||||
target_sources(obs-websocket PRIVATE src/plugin-macros.generated.h)
|
target_sources(obs-websocket PRIVATE plugin-macros.generated.h)
|
||||||
|
|
||||||
target_compile_definitions(
|
target_compile_definitions(
|
||||||
obs-websocket PRIVATE ASIO_STANDALONE $<$<BOOL:PLUGIN_TESTS>:PLUGIN_TESTS>
|
obs-websocket PRIVATE ASIO_STANDALONE $<$<BOOL:PLUGIN_TESTS>:PLUGIN_TESTS>
|
||||||
@ -145,8 +145,6 @@ target_compile_options(
|
|||||||
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-error=null-pointer-subtraction;-Wno-error=deprecated-declarations;-Wno-error=implicit-int-conversion;-Wno-error=shorten-64-to-32>
|
$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-error=null-pointer-subtraction;-Wno-error=deprecated-declarations;-Wno-error=implicit-int-conversion;-Wno-error=shorten-64-to-32>
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(obs-websocket PRIVATE deps/asio/asio/include deps/websocketpp)
|
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
obs-websocket
|
obs-websocket
|
||||||
PRIVATE OBS::libobs
|
PRIVATE OBS::libobs
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
project(obs-websocket VERSION 5.2.0)
|
project(obs-websocket VERSION 5.2.2)
|
||||||
set(OBS_WEBSOCKET_RPC_VERSION 1)
|
set(OBS_WEBSOCKET_RPC_VERSION 1)
|
||||||
|
|
||||||
option(ENABLE_WEBSOCKET "Enable building OBS with websocket plugin" ON)
|
option(ENABLE_WEBSOCKET "Enable building OBS with websocket plugin" ON)
|
||||||
@ -32,8 +32,7 @@ find_package(Asio 1.12.1 REQUIRED)
|
|||||||
add_definitions(-DASIO_STANDALONE)
|
add_definitions(-DASIO_STANDALONE)
|
||||||
|
|
||||||
# Configure files
|
# Configure files
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/plugin-macros.h.in
|
configure_file(src/plugin-macros.h.in plugin-macros.generated.h)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/plugin-macros.generated.h)
|
|
||||||
|
|
||||||
# Setup target
|
# Setup target
|
||||||
add_library(obs-websocket MODULE)
|
add_library(obs-websocket MODULE)
|
||||||
@ -49,6 +48,8 @@ if(_QT_VERSION EQUAL 6 AND OS_WINDOWS)
|
|||||||
set_target_properties(obs-websocket PROPERTIES AUTORCC_OPTIONS "--format-version;1")
|
set_target_properties(obs-websocket PROPERTIES AUTORCC_OPTIONS "--format-version;1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(obs-websocket PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
target_sources(
|
target_sources(
|
||||||
obs-websocket
|
obs-websocket
|
||||||
PRIVATE src/obs-websocket.cpp
|
PRIVATE src/obs-websocket.cpp
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
OBSWebSocket.Plugin.Description="کنترل از راه دور OBS Studio از طریق WebSocket"
|
OBSWebSocket.Plugin.Description="کنترل از راه دور OBS Studio از طریق WebSocket"
|
||||||
|
OBSWebSocket.Settings.DialogTitle="تنظیمات سرور سوکت وب"
|
||||||
OBSWebSocket.Settings.PluginSettingsTitle="تنظیمات پلاگین"
|
OBSWebSocket.Settings.PluginSettingsTitle="تنظیمات پلاگین"
|
||||||
OBSWebSocket.Settings.ServerEnable="سرور سوکت وب را فعال کنید"
|
OBSWebSocket.Settings.ServerEnable="سرور سوکت وب را فعال کنید"
|
||||||
OBSWebSocket.Settings.AlertsEnable="هشدارهای سینی سیستم را فعال کنید"
|
OBSWebSocket.Settings.AlertsEnable="هشدارهای سینی سیستم را فعال کنید"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
OBSWebSocket.Plugin.Description="OBS Studio-ի հեռակառավարումը WebSocket-ի միջոցով"
|
OBSWebSocket.Plugin.Description="OBS Studio-ի հեռակառավարումը WebSocket-ի միջոցով"
|
||||||
|
OBSWebSocket.Settings.DialogTitle="WebSocket Սպասարկչի Կարգավորումները"
|
||||||
OBSWebSocket.Settings.PluginSettingsTitle="Միացնիչի կարգավորումներ"
|
OBSWebSocket.Settings.PluginSettingsTitle="Միացնիչի կարգավորումներ"
|
||||||
OBSWebSocket.Settings.ServerEnable="Միացնել WebSocket սերվերը"
|
OBSWebSocket.Settings.ServerEnable="Միացնել WebSocket սերվերը"
|
||||||
OBSWebSocket.Settings.AlertsEnable="Միացնել սկուտեղի ծանուցումները"
|
OBSWebSocket.Settings.AlertsEnable="Միացնել սկուտեղի ծանուցումները"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
OBSWebSocket.Plugin.Description="Controlo remoto do OBS Studio através de WebSocket"
|
OBSWebSocket.Plugin.Description="Controlo remoto do OBS Studio através de WebSocket"
|
||||||
|
OBSWebSocket.Settings.DialogTitle="Definições do servidor WebSocket"
|
||||||
OBSWebSocket.Settings.PluginSettingsTitle="Configurações do plugin"
|
OBSWebSocket.Settings.PluginSettingsTitle="Configurações do plugin"
|
||||||
OBSWebSocket.Settings.ServerEnable="Ativar servidor WebSocket"
|
OBSWebSocket.Settings.ServerEnable="Ativar servidor WebSocket"
|
||||||
OBSWebSocket.Settings.AlertsEnable="Ativar alertas da bandeja do sistema"
|
OBSWebSocket.Settings.AlertsEnable="Ativar alertas da bandeja do sistema"
|
||||||
|
@ -5,3 +5,9 @@ OBSWebSocket.Settings.Password="Mật khẩu máy chủ"
|
|||||||
OBSWebSocket.Settings.GeneratePassword="Tạo mật khẩu"
|
OBSWebSocket.Settings.GeneratePassword="Tạo mật khẩu"
|
||||||
OBSWebSocket.Settings.ServerPort="Cổng máy chủ"
|
OBSWebSocket.Settings.ServerPort="Cổng máy chủ"
|
||||||
OBSWebSocket.Settings.ShowConnectInfo="Hiện thông tin kết nối"
|
OBSWebSocket.Settings.ShowConnectInfo="Hiện thông tin kết nối"
|
||||||
|
OBSWebSocket.SessionTable.IdentifiedTitle="Định dạng"
|
||||||
|
OBSWebSocket.ConnectInfo.ServerIp="IP Máy chủ (Gợi ý tốt nhất)"
|
||||||
|
OBSWebSocket.ConnectInfo.ServerPort="Cổng máy chủ"
|
||||||
|
OBSWebSocket.ConnectInfo.ServerPassword="Mật khẩu máy chủ"
|
||||||
|
OBSWebSocket.ConnectInfo.QrTitle="Kết nối bằng mã QR"
|
||||||
|
OBSWebSocket.TrayNotification.Identified.Title="Tạo cổng kết nối WebSocket mới"
|
||||||
|
@ -4,7 +4,7 @@ OBSWebSocket.Settings.PluginSettingsTitle="插件设置"
|
|||||||
OBSWebSocket.Settings.ServerEnable="开启 WebSocket 服务器"
|
OBSWebSocket.Settings.ServerEnable="开启 WebSocket 服务器"
|
||||||
OBSWebSocket.Settings.AlertsEnable="开启系统托盘提醒"
|
OBSWebSocket.Settings.AlertsEnable="开启系统托盘提醒"
|
||||||
OBSWebSocket.Settings.DebugEnable="开启调试日志"
|
OBSWebSocket.Settings.DebugEnable="开启调试日志"
|
||||||
OBSWebSocket.Settings.DebugEnableHoverText="启用当前 OBS 实例的调试日志。下次启动时需重新设置。\n使用 --websocket_debug 在启动 OBS 时启用日志。"
|
OBSWebSocket.Settings.DebugEnableHoverText="开启当前 OBS 实例的调试日志。下次启动时需重新设置。\n使用 --websocket_debug 在启动 OBS 时开启日志。"
|
||||||
OBSWebSocket.Settings.ServerSettingsTitle="服务器设置"
|
OBSWebSocket.Settings.ServerSettingsTitle="服务器设置"
|
||||||
OBSWebSocket.Settings.AuthRequired="开启鉴权"
|
OBSWebSocket.Settings.AuthRequired="开启鉴权"
|
||||||
OBSWebSocket.Settings.Password="服务器密码"
|
OBSWebSocket.Settings.Password="服务器密码"
|
||||||
|
@ -27,7 +27,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include "../obs-websocket.h"
|
#include "../obs-websocket.h"
|
||||||
#include "../utils/Obs.h"
|
#include "../utils/Obs.h"
|
||||||
#include "../utils/Obs_VolumeMeter.h"
|
#include "../utils/Obs_VolumeMeter.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
class EventHandler {
|
class EventHandler {
|
||||||
public:
|
public:
|
||||||
|
@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include <QtWidgets/QDialog>
|
#include <QtWidgets/QDialog>
|
||||||
|
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
#include "ui_ConnectInfo.h"
|
#include "ui_ConnectInfo.h"
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include "ConnectInfo.h"
|
#include "ConnectInfo.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
#include "ui_SettingsDialog.h"
|
#include "ui_SettingsDialog.h"
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include "../websocketserver/rpc/WebSocketSession.h"
|
#include "../websocketserver/rpc/WebSocketSession.h"
|
||||||
#include "../obs-websocket.h"
|
#include "../obs-websocket.h"
|
||||||
#include "../utils/Obs.h"
|
#include "../utils/Obs.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
class RequestHandler;
|
class RequestHandler;
|
||||||
typedef RequestResult (RequestHandler::*RequestMethodHandler)(const Request &);
|
typedef RequestResult (RequestHandler::*RequestMethodHandler)(const Request &);
|
||||||
|
@ -22,7 +22,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include <QRandomGenerator>
|
#include <QRandomGenerator>
|
||||||
|
|
||||||
#include "Crypto.h"
|
#include "Crypto.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
static const char allowedChars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
static const char allowedChars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||||
static const int allowedCharsCount = static_cast<int>(sizeof(allowedChars) - 1);
|
static const int allowedCharsCount = static_cast<int>(sizeof(allowedChars) - 1);
|
||||||
|
@ -19,7 +19,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include "Json.h"
|
#include "Json.h"
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
bool Utils::Json::JsonArrayIsValidObsArray(const json &j)
|
bool Utils::Json::JsonArrayIsValidObsArray(const json &j)
|
||||||
{
|
{
|
||||||
|
@ -18,4 +18,4 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Obs.h"
|
#include "Obs.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
@ -17,7 +17,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Obs.h"
|
#include "Obs.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
struct CreateSceneItemData {
|
struct CreateSceneItemData {
|
||||||
obs_source_t *source; // In
|
obs_source_t *source; // In
|
||||||
|
@ -20,7 +20,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "Obs.h"
|
#include "Obs.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
static std::vector<std::string> ConvertStringArray(char **array)
|
static std::vector<std::string> ConvertStringArray(char **array)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include <util/util_uint64.h>
|
#include <util/util_uint64.h>
|
||||||
|
|
||||||
#include "Obs.h"
|
#include "Obs.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
uint64_t Utils::Obs::NumberHelper::GetOutputDuration(obs_output_t *output)
|
uint64_t Utils::Obs::NumberHelper::GetOutputDuration(obs_output_t *output)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include "Obs.h"
|
#include "Obs.h"
|
||||||
#include "../obs-websocket.h"
|
#include "../obs-websocket.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
json Utils::Obs::ObjectHelper::GetStats()
|
json Utils::Obs::ObjectHelper::GetStats()
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Obs.h"
|
#include "Obs.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
obs_hotkey_t *Utils::Obs::SearchHelper::GetHotkeyByName(std::string name)
|
obs_hotkey_t *Utils::Obs::SearchHelper::GetHotkeyByName(std::string name)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include "Obs.h"
|
#include "Obs.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
#define CASE(x) \
|
#define CASE(x) \
|
||||||
case x: \
|
case x: \
|
||||||
|
@ -25,7 +25,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include <obs-frontend-api.h>
|
#include <obs-frontend-api.h>
|
||||||
|
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
std::string Utils::Platform::GetLocalAddress()
|
std::string Utils::Platform::GetLocalAddress()
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include "types/WebSocketOpCode.h"
|
#include "types/WebSocketOpCode.h"
|
||||||
#include "../utils/Json.h"
|
#include "../utils/Json.h"
|
||||||
#include "../requesthandler/rpc/Request.h"
|
#include "../requesthandler/rpc/Request.h"
|
||||||
#include "../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
class WebSocketServer : QObject {
|
class WebSocketServer : QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -24,7 +24,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "../../plugin-macros.generated.h"
|
#include "plugin-macros.generated.h"
|
||||||
|
|
||||||
class WebSocketSession;
|
class WebSocketSession;
|
||||||
typedef std::shared_ptr<WebSocketSession> SessionPtr;
|
typedef std::shared_ptr<WebSocketSession> SessionPtr;
|
||||||
|
Reference in New Issue
Block a user