Skip to content

Commit 0d3f0ed

Browse files
authored
Merge pull request #36 from OPENSPHERE-Inc/patch-0.7.0
0.7.0
2 parents 025c78f + 727a495 commit 0d3f0ed

31 files changed

+2043
-241
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "lib/json"]
55
path = lib/json
66
url = https://github.com/nlohmann/json.git
7+
[submodule "lib/obs-websocket"]
8+
path = lib/obs-websocket
9+
url = https://github.com/obsproject/obs-websocket.git

CMakeLists.txt

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,32 @@ set(o2_SRCS
7878

7979
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${o2_SRCS})
8080

81+
configure_file(lib/obs-websocket/src/plugin-macros.h.in plugin-macros.generated.h)
82+
83+
set(obs-websocket_SRCS
84+
lib/obs-websocket/src/eventhandler/EventHandler_Config.cpp
85+
lib/obs-websocket/src/eventhandler/EventHandler_Filters.cpp
86+
lib/obs-websocket/src/eventhandler/EventHandler_General.cpp
87+
lib/obs-websocket/src/eventhandler/EventHandler_Inputs.cpp
88+
lib/obs-websocket/src/eventhandler/EventHandler_MediaInputs.cpp
89+
lib/obs-websocket/src/eventhandler/EventHandler_Outputs.cpp
90+
lib/obs-websocket/src/eventhandler/EventHandler_SceneItems.cpp
91+
lib/obs-websocket/src/eventhandler/EventHandler_Scenes.cpp
92+
lib/obs-websocket/src/eventhandler/EventHandler_Transitions.cpp
93+
lib/obs-websocket/src/eventhandler/EventHandler_Ui.cpp
94+
lib/obs-websocket/src/eventhandler/EventHandler.cpp
95+
lib/obs-websocket/src/utils/Obs_VolumeMeter.cpp
96+
lib/obs-websocket/src/utils/Obs_StringHelper.cpp
97+
lib/obs-websocket/src/utils/Obs_ArrayHelper.cpp
98+
lib/obs-websocket/src/utils/Obs_ObjectHelper.cpp
99+
lib/obs-websocket/src/utils/Json.cpp
100+
lib/obs-websocket/src/utils/Obs_NumberHelper.cpp
101+
lib/obs-websocket/src/plugin-macros.h.in)
102+
103+
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${obs-websocket_SRCS})
104+
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,GNU,AppleClang,Clang>:-Wno-error=shadow
105+
-Wno-error=conversion>)
106+
81107
add_subdirectory(${CMAKE_SOURCE_DIR}/lib/json)
82108
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE nlohmann_json::nlohmann_json)
83109

@@ -98,17 +124,22 @@ target_sources(
98124
src/UI/egress-link-dock.cpp
99125
src/UI/egress-link-connection-widget.ui
100126
src/UI/egress-link-connection-widget.cpp
127+
src/UI/ws-portal-dock.ui
128+
src/UI/ws-portal-dock.cpp
101129
src/UI/resources.qrc
102130
src/sources/ingress-link-source.cpp
103131
src/sources/audio-capture.cpp
104132
src/sources/image-renderer.cpp
105133
src/outputs/egress-link-output.cpp
106-
src/outputs/audio-source.cpp)
134+
src/outputs/audio-source.cpp
135+
src/ws-portal/ws-portal-client.cpp
136+
src/ws-portal/event-handler.cpp)
107137

108138
target_include_directories(
109139
${CMAKE_PROJECT_NAME}
110140
PRIVATE ${CMAKE_SOURCE_DIR}/lib/o2/src ${CMAKE_SOURCE_DIR}/shared/properties-view
111-
${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area ${CMAKE_SOURCE_DIR}/shared/qt/wrappers)
141+
${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area ${CMAKE_SOURCE_DIR}/shared/qt/wrappers
142+
${CMAKE_SOURCE_DIR}/lib/obs-websocket/lib ${CMAKE_SOURCE_DIR}/lib/obs-websocket/src)
112143

113144
if(NOT buildspec)
114145
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec)

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ SRC-Link works with [SRC-Link Control Panel](https://src-link.live/introduction)
2323
- **(Since 0.5.5)** Operation Teams allows to share receiver among your organization staffs to operate live streaming program jointly.
2424
- **(Since 0.6.0)** Stream Recording functionality records cleanfeed in guest's local disk.
2525
- **(Since 0.6.0)** External Connections allows SRC-Link connects to external SRT servers such as vMix, SRT MiniServer, Nimble Streamer etc..
26-
26+
- **(Since 0.7.0)** WebSocket Portal for OBS provides an obs-websocket compatible server and allows remote control of
27+
OBS Studio over the Internet using obs-websocket clients. No open ports, tunneling or VPN is required.
28+
2729
**Glossary**
2830

2931
- **HOST**: OBS instance (and SRC-Link user) receiving video and audio

README_ja.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ SRC-Link はウェブサービスの [SRC-Link Control Panel](https://src-link.l
2222
- **(0.5.5 より)** 運営チームを使用すると、組織のスタッフ間でレシーバーを共有し、ライブ配信を共同で運営できます。
2323
- **(0.6.0 より)** ストリーム録画機能は、ゲストのローカルディスクにクリーンフィードを録画します。
2424
- **(0.6.0 より)** 外部コネクションは、vMix や SRT MiniServer、Nimble Streamer 等の外部 SRT サーバーと SRC-Link を接続することができます。
25-
25+
- **(0.7.0 より)** WebSocket ポータル for OBS は obs-websocket 互換のサーバーを提供し、obs-websocket クライアントを使った、
26+
インターネット越しに OBS Studio のリモートコントロールを可能にします。ポートの開放やトンネリング、VPN は不要です。
27+
2628
**用語集**
2729

2830
- **ホスト**: 映像音声を受信する OBS インスタンス(及び SRC-Link ユーザー)

buildspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"name": "osi-src-link",
4040
"displayName": "SRC-Link Plugin",
41-
"version": "0.6.1",
41+
"version": "0.7.0",
4242
"author": "OPENSPHERE Inc.",
4343
"website": "https://opensphere.co.jp/",
4444
"email": "[email protected]",

data/locale/en-US.ini

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ SRCLinkDock="SRC-Link"
5959
SourceLinkSettings="SRC-Link Settings"
6060
oauth-reply.html="oauth-reply-en-US.html"
6161
DownlinkInput="SRC-Link Downlink"
62-
Uplink="Uplink"
62+
Uplink="Uplink Receiver"
6363
Interlock="Interlock"
6464
NoReceiver="No Receiver"
6565
LocalSource="Video Source"
@@ -127,4 +127,15 @@ SplitFile.NoSplit="No split"
127127
SplitFile.ByTime="Split by Time"
128128
SplitFile.BySize="Split by Size"
129129
SplitFile.Time="Split Time (Minutes)"
130-
SplitFile.Size="Split Size (MB)"
130+
SplitFile.Size="Split Size (MB)"
131+
OBSWebSocketPortal="OBS WebSocket Portal"
132+
NoPortal="No Portal"
133+
ManagePortals="Manage Portals"
134+
Connected="Connected"
135+
Disconnected="Disconnected"
136+
Reconnecting="Reconnecting"
137+
WsPortalDock="WebSocket Portal"
138+
NotReady="Not Ready"
139+
Linked="Linked"
140+
Unlinked="Unlinked"
141+
Retrying="Retrying"

data/locale/ja-JP.ini

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ SRCLinkDock="SRC-Link"
5959
SourceLinkSettings="SRC-Link 設定"
6060
oauth-reply.html="oauth-reply-ja-JP.html"
6161
DownlinkInput="SRC-Link ダウンリンク"
62-
Uplink="アップリンク"
62+
Uplink="アップリンク レシーバー"
6363
Interlock="連動"
6464
NoReceiver="レシーバーがありません"
6565
LocalSource="映像ソース"
@@ -128,3 +128,14 @@ SplitFile.ByTime="時間で分割"
128128
SplitFile.BySize="サイズで分割"
129129
SplitFile.Time="分割時間 (分)"
130130
SplitFile.Size="分割サイズ (MB)"
131+
OBSWebSocketPortal="OBS WebSocket ポータル"
132+
NoPortal="ポータルがありません"
133+
ManagePortals="ポータルを管理"
134+
Connected="接続済み"
135+
Disconnected="切断済み"
136+
Reconnecting="再接続中"
137+
WsPortalDock="WebSocket ポータル"
138+
NotReady="未接続"
139+
Linked="リンク済"
140+
Unlinked="未リンク"
141+
Retrying="再試行中"

lib/obs-websocket

Submodule obs-websocket added at eed8a49

src/UI/egress-link-connection-widget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ EgressLinkConnectionWidget::~EgressLinkConnectionWidget()
9898

9999
void EgressLinkConnectionWidget::onOBSSourcesChanged(void *data, calldata_t *)
100100
{
101-
auto widget = (EgressLinkConnectionWidget *)data;
101+
auto widget = static_cast<EgressLinkConnectionWidget *>(data);
102102
// Prevent crash
103103
QMetaObject::invokeMethod(widget, "updateSourceList", Qt::QueuedConnection);
104104
}
105105

106106
void EgressLinkConnectionWidget::onOBSFrontendEvent(enum obs_frontend_event event, void *param)
107107
{
108-
auto widget = (EgressLinkConnectionWidget *)param;
108+
auto widget = static_cast<EgressLinkConnectionWidget *>(param);
109109
// Prevent to reset output config
110110
if (event == OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN) {
111111
widget->sourceCreateSignal.Disconnect();
@@ -180,7 +180,7 @@ void EgressLinkConnectionWidget::updateSourceList()
180180

181181
obs_enum_sources(
182182
[](void *param, obs_source_t *_source) {
183-
auto widget = (EgressLinkConnectionWidget *)param;
183+
auto widget = static_cast<EgressLinkConnectionWidget *>(param);
184184
auto type = obs_source_get_type(_source);
185185
auto flags = obs_source_get_output_flags(_source);
186186

@@ -193,7 +193,7 @@ void EgressLinkConnectionWidget::updateSourceList()
193193
);
194194
obs_enum_scenes(
195195
[](void *param, obs_source_t *_source) {
196-
auto widget = (EgressLinkConnectionWidget *)param;
196+
auto widget = static_cast<EgressLinkConnectionWidget *>(param);
197197
auto type = obs_source_get_type(_source);
198198

199199
if (type == OBS_SOURCE_TYPE_SCENE && isSourceAvailable(_source)) {

src/UI/egress-link-dock.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ EgressLinkDock::EgressLinkDock(SRCLinkApiClient *_apiClient, QWidget *parent)
8282

8383
// Translations
8484
ui->egressLinkLabel->setText(QTStr("Uplink"));
85-
ui->participantLabel->setText(QTStr("Receiver"));
8685
ui->interlockTypeLabel->setText(QTStr("Interlock"));
8786
ui->participantComboBox->setPlaceholderText(QTStr("NoReceiver"));
8887
ui->controlPanelButton->setText(QTStr("SRCLinkControlPanel"));
@@ -237,18 +236,22 @@ void EgressLinkDock::onUplinkReady(const UplinkInfo &uplink)
237236
ui->seatAllocationStatus->setText(QTStr("Ready"));
238237
setThemeID(ui->seatAllocationSeatName, "good", "text-success");
239238
setThemeID(ui->seatAllocationStatus, "good", "text-success");
239+
} else if (!uplink.getStage().isEmpty()) {
240+
ui->seatAllocationSeatName->setText(QTStr("NoSlot"));
241+
ui->seatAllocationStatus->setText(QTStr("Ready"));
242+
setThemeID(ui->seatAllocationSeatName, "error", "text-danger");
243+
setThemeID(ui->seatAllocationStatus, "good", "text-success");
240244
} else {
241245
ui->seatAllocationSeatName->setText("");
242-
ui->seatAllocationStatus->setText(QTStr("NoSlot"));
243-
setThemeID(ui->seatAllocationSeatName, "error", "text-danger");
246+
ui->seatAllocationStatus->setText(QTStr("NotReady"));
244247
setThemeID(ui->seatAllocationStatus, "error", "text-danger");
245248
}
246249
}
247250

248251
void EgressLinkDock::onUplinkFailed(const QString &)
249252
{
250253
ui->seatAllocationSeatName->setText("");
251-
ui->seatAllocationStatus->setText(QTStr("NoSlot"));
254+
ui->seatAllocationStatus->setText(QTStr("NotReady"));
252255
setThemeID(ui->seatAllocationStatus, "error", "text-danger");
253256

254257
qDeleteAll(connectionWidgets);

0 commit comments

Comments
 (0)