Skip to content

Commit cb5bc83

Browse files
committed
Rebrand Switchy to Podswitch and transition to standalone plugin
1 parent da33c0d commit cb5bc83

7 files changed

Lines changed: 178 additions & 113 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
All notable changes to Switchy will be documented here.
3+
All notable changes to Podswitch will be documented here.
44
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

66
## [Unreleased]

CMakeLists.txt

Lines changed: 48 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.16)
2-
project(obs-auto-cam-switcher VERSION 1.0.0)
2+
project(podswitch VERSION 1.0.0)
33
set(CMAKE_CXX_STANDARD 17)
44
set(CMAKE_CXX_STANDARD_REQUIRED ON)
55

@@ -11,32 +11,35 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1111
# -DOBS_SOURCE_DIR=/path/to/obs-studio
1212
# We include our bundled src/obs-config.h stub so no OBS cmake build needed.
1313
# ---------------------------------------------------------------------------
14-
set(OBS_SOURCE_DIR "" CACHE PATH "obs-studio source tree")
14+
# ---------------------------------------------------------------------------
15+
# OBS Studio - Forced Header-Only Build (Option B)
16+
# ---------------------------------------------------------------------------
17+
if(NOT OBS_SOURCE_DIR)
18+
set(OBS_SOURCE_DIR "/Users/philybarrolaza/Library/Mobile Documents/com~apple~CloudDocs/Projects/Podswitch/.deps/obs-studio-31.1.1" CACHE PATH "obs-studio source tree" FORCE)
19+
endif()
1520

16-
if(OBS_SOURCE_DIR)
17-
message(STATUS "[switchy] Building against OBS source headers: ${OBS_SOURCE_DIR}")
21+
set(OBS_CONFIG_DIR "/Users/philybarrolaza/Library/Mobile Documents/com~apple~CloudDocs/Projects/Podswitch/.deps/obs-studio-31.1.1/build_universal/config")
1822

19-
add_library(OBS::libobs INTERFACE IMPORTED)
20-
target_include_directories(OBS::libobs INTERFACE
21-
"${OBS_SOURCE_DIR}/libobs" # obs.h, obs-module.h, obs-data.h, blog.h …
22-
"${OBS_SOURCE_DIR}" # fallback root
23-
"${CMAKE_SOURCE_DIR}/src" # our bundled obs-config.h stub lives here
24-
)
23+
message(STATUS "[podswitch] Using dependencies from: ${OBS_SOURCE_DIR}")
2524

26-
add_library(OBS::obs-frontend-api INTERFACE IMPORTED)
27-
target_include_directories(OBS::obs-frontend-api INTERFACE
28-
"${OBS_SOURCE_DIR}/UI/obs-frontend-api"
29-
"${OBS_SOURCE_DIR}/libobs"
30-
"${CMAKE_SOURCE_DIR}/src"
31-
)
25+
add_library(OBS::libobs INTERFACE IMPORTED)
26+
target_include_directories(OBS::libobs INTERFACE
27+
"${OBS_SOURCE_DIR}/libobs"
28+
"${OBS_CONFIG_DIR}"
29+
"${CMAKE_SOURCE_DIR}/src" # our bundled obs-config.h stub lives here
30+
)
3231

33-
# Plugin resolves OBS symbols at load time — no link-time OBS libs needed
34-
set(OBS_SKIP_LINK TRUE)
32+
add_library(OBS::obs-frontend-api INTERFACE IMPORTED)
33+
target_include_directories(OBS::obs-frontend-api INTERFACE
34+
"${OBS_SOURCE_DIR}/frontend/api"
35+
"${OBS_SOURCE_DIR}/libobs"
36+
"${OBS_CONFIG_DIR}"
37+
"${CMAKE_SOURCE_DIR}/src"
38+
)
39+
40+
# Plugin resolves OBS symbols at load time — no link-time OBS libs needed
41+
set(OBS_SKIP_LINK TRUE)
3542

36-
else()
37-
find_package(libobs REQUIRED)
38-
find_package(obs-frontend-api REQUIRED)
39-
endif()
4043

4144
# ---------------------------------------------------------------------------
4245
# Qt (Qt6 → Qt5 → headless)
@@ -49,7 +52,7 @@ else()
4952
if(Qt5_FOUND)
5053
set(QT_NS Qt5)
5154
else()
52-
message(WARNING "[switchy] Qt not found — building headless (no UI)")
55+
message(WARNING "[podswitch] Qt not found — building headless (no UI)")
5356
set(QT_NS "")
5457
endif()
5558
endif()
@@ -60,6 +63,15 @@ if(QT_NS)
6063
set(CMAKE_AUTORCC ON)
6164
endif()
6265

66+
# Robust macOS Sequoia Patch: Strip missing AGL framework from link lines
67+
if(APPLE)
68+
macro(target_link_libraries _target)
69+
set(_all_args ${ARGN})
70+
list(REMOVE_ITEM _all_args "-framework AGL")
71+
_target_link_libraries(${_target} ${_all_args})
72+
endmacro()
73+
endif()
74+
6375
# ---------------------------------------------------------------------------
6476
# Sources
6577
# ---------------------------------------------------------------------------
@@ -74,32 +86,33 @@ if(QT_NS)
7486
list(APPEND SRCS src/ui/dock-widget.cpp src/ui/settings-dialog.cpp)
7587
endif()
7688

77-
add_library(obs-auto-cam-switcher MODULE ${SRCS})
78-
target_include_directories(obs-auto-cam-switcher PRIVATE src src/ui)
79-
target_link_libraries(obs-auto-cam-switcher PRIVATE OBS::libobs OBS::obs-frontend-api)
89+
add_library(podswitch MODULE ${SRCS})
90+
target_include_directories(podswitch PRIVATE src src/ui)
91+
target_link_libraries(podswitch PRIVATE OBS::libobs OBS::obs-frontend-api)
8092
if(QT_NS)
81-
target_link_libraries(obs-auto-cam-switcher PRIVATE ${QT_NS}::Core ${QT_NS}::Widgets)
93+
target_link_libraries(podswitch PRIVATE ${QT_NS}::Core ${QT_NS}::Widgets)
8294
endif()
83-
set_target_properties(obs-auto-cam-switcher PROPERTIES PREFIX "")
95+
set_target_properties(podswitch PROPERTIES PREFIX "")
8496

8597
# Runtime-link OBS symbols (resolved at plugin load time by OBS)
8698
if(OBS_SKIP_LINK)
8799
if(APPLE)
88-
target_link_options(obs-auto-cam-switcher PRIVATE -undefined dynamic_lookup)
100+
target_link_options(podswitch PRIVATE -undefined dynamic_lookup)
89101
elseif(UNIX)
90-
target_link_options(obs-auto-cam-switcher PRIVATE -Wl,--allow-shlib-undefined)
102+
target_link_options(podswitch PRIVATE -Wl,--allow-shlib-undefined)
91103
endif()
92104
endif()
93105

94106
# ---------------------------------------------------------------------------
95107
# Install
96108
# ---------------------------------------------------------------------------
97109
if(APPLE)
98-
set(_PLUG "$ENV{HOME}/Library/Application Support/obs-studio/plugins/obs-auto-cam-switcher")
110+
set(_PLUG "$ENV{HOME}/Library/Application Support/obs-studio/plugins/podswitch.plugin")
99111
elseif(WIN32)
100-
set(_PLUG "$ENV{APPDATA}/obs-studio/plugins/obs-auto-cam-switcher")
112+
set(_PLUG "$ENV{APPDATA}/obs-studio/plugins/podswitch")
101113
else()
102-
set(_PLUG "$ENV{HOME}/.config/obs-studio/plugins/obs-auto-cam-switcher")
114+
set(_PLUG "$ENV{HOME}/.config/obs-studio/plugins/podswitch")
103115
endif()
104-
install(TARGETS obs-auto-cam-switcher LIBRARY DESTINATION "${_PLUG}/bin/64bit")
105-
install(DIRECTORY data/ DESTINATION "${_PLUG}/data")
116+
install(TARGETS podswitch LIBRARY DESTINATION "${_PLUG}/Contents/MacOS")
117+
install(DIRECTORY data/ DESTINATION "${_PLUG}/Contents/Resources")
118+

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Switchy — The Podcast Auto Camera Switcher
1+
# Podswitch — The Podcast Auto Camera Switcher
22

3-
> **Switchy** automatically switches OBS Studio scenes based on who's speaking — just like the **RØDECaster Video** Auto Switching feature, but for everyone.
3+
> **Podswitch** automatically switches OBS Studio scenes based on who's speaking — just like the **RØDECaster Video** Auto Switching feature, but for everyone.
44
55
![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)
66
![OBS Studio 30+](https://img.shields.io/badge/OBS%20Studio-30%2B-blue.svg)
@@ -26,7 +26,7 @@
2626

2727
## 🎬 How It Works
2828

29-
Every ~10ms, Switchy:
29+
Every ~10ms, Podswitch:
3030
1. Reads the **RMS audio level** of each mapped microphone
3131
2. Applies **Exponential Moving Average** smoothing (controlled by Responsiveness)
3232
3. Adds a **priority bias** (±6 dB) to favour preferred cameras
@@ -40,7 +40,7 @@ Every ~10ms, Switchy:
4040
**Dock Panel**
4141
```
4242
┌─────────────────────────────────┐
43-
│ 🎥 Switchy [ON] │
43+
│ 🎥 Podswitch [ON] │
4444
├─────────────────────────────────┤
4545
│ Mic 1 ───┤██████░░░░│→ Host │
4646
│ Mic 2 ───┤███░░░░░░░│→ Guest │
@@ -84,22 +84,22 @@ The plugin is auto-installed to your OBS plugins directory.
8484

8585
## 🎙️ Quick Start
8686

87-
1. Open OBS → find the **Switchy** dock (View → Docks)
87+
1. Open OBS → find the **Podswitch** dock (View → Docks)
8888
2. Click **⚙ Open Settings**
8989
3. Add a mapping per speaker:
9090
- **Audio Source** → microphone
9191
- **Scene / Camera** → OBS scene to cut to
9292
- **Priority** → High for close-ups, Low for wide shot
9393
- **Threshold** → silence gate (default −40 dB)
9494
4. Set a **Fallback Scene** (e.g. wide shot)
95-
5. Hit **● Enable**Switchy takes over 🎉
95+
5. Hit **● Enable**Podswitch takes over 🎉
9696

9797
---
9898

9999
## 📁 Project Structure
100100

101101
```
102-
switchy-podcast-auto-switcher/
102+
podswitch/
103103
├── CMakeLists.txt
104104
├── buildspec.json
105105
├── src/

buildspec.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "switchy-podcast-auto-switcher",
2+
"name": "podswitch",
33
"version": "1.0.0",
44
"author": "phil426",
5-
"displayName": "Switchy — The Podcast Auto Camera Switcher",
5+
"displayName": "Podswitch — The Podcast Auto Camera Switcher",
66
"website": "https://github.com/phil426/switchy-podcast-auto-switcher",
77
"uiVersion": 1,
88
"dependencies": {

data/locale/en-US.ini

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Switchy.PluginName=Switchy
2-
Switchy.DockTitle=Switchy — Auto Cam Switcher
3-
Switchy.EnableButton=Enable Switchy
4-
Switchy.DisableButton=Disable Switchy
5-
Switchy.Settings=Settings
6-
Switchy.Responsiveness=Responsiveness
7-
Switchy.Relaxed=Relaxed
8-
Switchy.Neutral=Neutral
9-
Switchy.Fast=Fast
1+
Podswitch.PluginName=Podswitch
2+
Podswitch.DockTitle=Podswitch — Auto Cam Switcher
3+
Podswitch.EnableButton=Enable Podswitch
4+
Podswitch.DisableButton=Disable Podswitch
5+
Podswitch.Settings=Settings
6+
Podswitch.Responsiveness=Responsiveness
7+
Podswitch.Relaxed=Relaxed
8+
Podswitch.Neutral=Neutral
9+
Podswitch.Fast=Fast

src/plugin-main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <util/base.h>
1010

1111
OBS_DECLARE_MODULE()
12-
OBS_MODULE_USE_DEFAULT_LOCALE("obs-auto-cam-switcher", "en-US")
12+
OBS_MODULE_USE_DEFAULT_LOCALE("podswitch", "en-US")
1313

1414
static Config *g_config = nullptr;
1515
static SwitchEngine *g_engine = nullptr;
@@ -86,7 +86,7 @@ static void on_frontend_event(enum obs_frontend_event event, void *) {
8686
}
8787
}
8888
bool obs_module_load() {
89-
blog(LOG_INFO, "[switchy] Loading Switchy v1.0.0");
89+
blog(LOG_INFO, "[podswitch] Loading Podswitch v1.0.0");
9090
g_config = new Config();
9191
g_engine = new SwitchEngine();
9292
g_monitor = new AudioMonitor();
@@ -96,7 +96,7 @@ bool obs_module_load() {
9696
apply_config();
9797
obs_frontend_add_event_callback(on_frontend_event, nullptr);
9898
g_dock = new AutoCamDock(g_engine);
99-
obs_frontend_add_dock_by_id("switchy-dock", "Switchy", g_dock);
99+
obs_frontend_add_dock_by_id("podswitch-dock", "Podswitch", g_dock);
100100
g_settings_dlg = new SettingsDialog(g_config);
101101
QObject::connect(g_settings_dlg, &SettingsDialog::settings_applied,
102102
[](const Config &) { apply_config(); });
@@ -106,7 +106,7 @@ bool obs_module_load() {
106106
g_settings_dlg->raise();
107107
g_settings_dlg->activateWindow();
108108
});
109-
blog(LOG_INFO, "[switchy] Loaded OK");
109+
blog(LOG_INFO, "[podswitch] Loaded OK");
110110
return true;
111111
}
112112
void obs_module_unload() {
@@ -122,7 +122,7 @@ void obs_module_unload() {
122122
g_engine = nullptr;
123123
g_config = nullptr;
124124
}
125-
const char *obs_module_name() { return "Switchy"; }
125+
const char *obs_module_name() { return "Podswitch"; }
126126
const char *obs_module_description() {
127-
return "Podcast auto camera switcher inspired by RorodeCaster Video.";
127+
return "Podcast auto camera switcher.";
128128
}

0 commit comments

Comments
 (0)