Skip to content

Commit 5cf79ee

Browse files
Merge pull request #14 from chrisgleissner/bugfix/windows-recording
Fix Windows debugging and plugin display name
2 parents e495978 + cdb68ca commit 5cf79ee

27 files changed

+617
-97
lines changed

.vscode/c_cpp_properties.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
{
22
"configurations": [
3+
{
4+
"name": "Win32",
5+
"includePath": [
6+
"${workspaceFolder}/**",
7+
"${workspaceFolder}/.deps/obs-studio-*/libobs",
8+
"${workspaceFolder}/.deps/obs-studio-*/libobs/**",
9+
"${workspaceFolder}/.deps/obs-deps-*/win64/include",
10+
"${workspaceFolder}/.deps/obs-deps-*/win64/include/**"
11+
],
12+
"defines": [
13+
"_DEBUG",
14+
"UNICODE",
15+
"_UNICODE",
16+
"WIN32",
17+
"_WIN32",
18+
"_WINDOWS"
19+
],
20+
"compilerPath": "cl.exe",
21+
"cStandard": "c17",
22+
"cppStandard": "c++17",
23+
"intelliSenseMode": "windows-msvc-x64",
24+
"configurationProvider": "ms-vscode.cmake-tools"
25+
},
326
{
427
"name": "Linux",
528
"includePath": [

.vscode/launch.json

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,41 @@
11
{
2+
// VS Code launch configurations for debugging C64U plugin with OBS Studio
3+
//
4+
// Windows users: If OBS is installed in a different location, update the "program" path
5+
// Common OBS paths:
6+
// - "C:/Program Files/obs-studio/bin/64bit/obs64.exe" (default)
7+
// - "C:/Program Files (x86)/obs-studio/bin/64bit/obs64.exe" (32-bit system)
8+
// - "${env:LOCALAPPDATA}/Programs/obs-studio/bin/64bit/obs64.exe" (portable install)
9+
//
10+
// Linux users: OBS is typically at "/usr/bin/obs"
11+
212
"version": "0.2.0",
313
"configurations": [
414
{
5-
"name": "Debug OBS with C64U Plugin",
15+
"name": "Debug OBS with C64U Plugin (Windows)",
16+
"type": "cppvsdbg",
17+
"request": "launch",
18+
"program": "C:/Program Files/obs-studio/bin/64bit/obs64.exe",
19+
"args": ["--verbose"],
20+
"stopAtEntry": false,
21+
"cwd": "${workspaceFolder}",
22+
"environment": [],
23+
"console": "externalTerminal",
24+
"preLaunchTask": "Build Debug Plugin (Windows)",
25+
"logging": {
26+
"moduleLoad": false,
27+
"trace": false,
28+
"engineLogging": false,
29+
"programOutput": true,
30+
"exceptions": true
31+
}
32+
},
33+
{
34+
"name": "Debug OBS with C64U Plugin (Linux)",
635
"type": "cppdbg",
736
"request": "launch",
837
"program": "/usr/bin/obs",
9-
"args": [],
38+
"args": ["--verbose"],
1039
"stopAtEntry": false,
1140
"cwd": "${workspaceFolder}",
1241
"environment": [],
@@ -19,7 +48,7 @@
1948
"ignoreFailures": true
2049
}
2150
],
22-
"preLaunchTask": "Build Debug Plugin",
51+
"preLaunchTask": "Build Debug Plugin (Linux)",
2352
"miDebuggerPath": "/usr/bin/gdb",
2453
"logging": {
2554
"moduleLoad": false,

.vscode/tasks.json

Lines changed: 90 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"label": "Build Debug Plugin",
5+
"label": "Build Debug Plugin (Windows)",
66
"type": "shell",
77
"command": "cmake",
88
"args": [
99
"--build",
10-
"build_x86_64"
10+
"build_x64",
11+
"--config",
12+
"Debug"
1113
],
1214
"group": {
1315
"kind": "build",
@@ -24,15 +26,67 @@
2426
"options": {
2527
"cwd": "${workspaceFolder}"
2628
},
27-
"dependsOn": "Install Plugin to OBS"
29+
"dependsOn": "Install Plugin to OBS (Windows)",
30+
"windows": {
31+
"command": "cmake"
32+
}
33+
},
34+
{
35+
"label": "Build Debug Plugin (Linux)",
36+
"type": "shell",
37+
"command": "cmake",
38+
"args": [
39+
"--build",
40+
"build_x86_64"
41+
],
42+
"group": {
43+
"kind": "build"
44+
},
45+
"presentation": {
46+
"echo": true,
47+
"reveal": "silent",
48+
"focus": false,
49+
"panel": "shared",
50+
"showReuseMessage": true,
51+
"clear": false
52+
},
53+
"options": {
54+
"cwd": "${workspaceFolder}"
55+
},
56+
"dependsOn": "Install Plugin to OBS (Linux)",
57+
"linux": {
58+
"command": "cmake"
59+
}
60+
},
61+
{
62+
"label": "Install Plugin to OBS (Windows)",
63+
"type": "shell",
64+
"command": "powershell",
65+
"args": [
66+
"-File",
67+
"${workspaceFolder}/build-aux/install-plugin-windows.ps1"
68+
],
69+
"group": "build",
70+
"presentation": {
71+
"echo": true,
72+
"reveal": "silent",
73+
"focus": false,
74+
"panel": "shared"
75+
},
76+
"options": {
77+
"cwd": "${workspaceFolder}"
78+
},
79+
"windows": {
80+
"command": "powershell"
81+
}
2882
},
2983
{
30-
"label": "Install Plugin to OBS",
84+
"label": "Install Plugin to OBS (Linux)",
3185
"type": "shell",
32-
"command": "cp",
86+
"command": "bash",
3387
"args": [
34-
"build_x86_64/c64u-plugin-for-obs.so",
35-
"${env:HOME}/.config/obs-studio/plugins/c64u-plugin-for-obs/bin/64bit/"
88+
"-c",
89+
"mkdir -p \"$HOME/.config/obs-studio/plugins/c64u-plugin-for-obs/bin/64bit\" && mkdir -p \"$HOME/.config/obs-studio/plugins/c64u-plugin-for-obs/data\" && cp \"build_x86_64/c64u-plugin-for-obs.so\" \"$HOME/.config/obs-studio/plugins/c64u-plugin-for-obs/bin/64bit/\" && cp -r \"data\"/* \"$HOME/.config/obs-studio/plugins/c64u-plugin-for-obs/data/\""
3690
],
3791
"group": "build",
3892
"presentation": {
@@ -43,10 +97,35 @@
4397
},
4498
"options": {
4599
"cwd": "${workspaceFolder}"
100+
},
101+
"linux": {
102+
"command": "bash"
46103
}
47104
},
48105
{
49-
"label": "Clean Build",
106+
"label": "Clean Build (Windows)",
107+
"type": "shell",
108+
"command": "powershell",
109+
"args": [
110+
"-Command",
111+
"Remove-Item -Recurse -Force -Path \"build_x64\" -ErrorAction SilentlyContinue"
112+
],
113+
"group": "build",
114+
"presentation": {
115+
"echo": true,
116+
"reveal": "always",
117+
"focus": false,
118+
"panel": "shared"
119+
},
120+
"options": {
121+
"cwd": "${workspaceFolder}"
122+
},
123+
"windows": {
124+
"command": "powershell"
125+
}
126+
},
127+
{
128+
"label": "Clean Build (Linux)",
50129
"type": "shell",
51130
"command": "rm",
52131
"args": [
@@ -62,6 +141,9 @@
62141
},
63142
"options": {
64143
"cwd": "${workspaceFolder}"
144+
},
145+
"linux": {
146+
"command": "rm"
65147
}
66148
}
67149
]

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ See the [OBS Plugins Guide](https://obsproject.com/kb/plugins-guide).
7272
2. **Open Properties:** Select the "C64U" source in your sources list, then click the "Properties" button to open the configuration dialog
7373
3. **Debug Logging:** Enable detailed logging for debugging connection issues (optional)
7474
4. **Configure Network Settings:**
75-
- **C64 Ultimate IP:** Enter your Ultimate device's IP address to enable automatic streaming control from OBS (recommended for convenience), or set to `0.0.0.0` to accept streams from any C64 Ultimate on your network (requires manual control from the device)
76-
- **OBS Server IP:** IP address where C64 Ultimate sends streams (auto-detected by default)
75+
- **C64U Host:** Enter your Ultimate device's hostname (default: `c64u`) or IP address to enable automatic streaming control from OBS (recommended for convenience), or set to `0.0.0.0` to accept streams from any C64 Ultimate on your network (requires manual control from the device)
76+
- **OBS Server IP:** IP address where C64 Ultimate sends streams (auto-detected by default)
7777
- **Auto-detect OBS IP:** Automatically detect and use OBS server IP in streaming commands (recommended)
7878
5. **Configure Ports:** Use the default ports (video: 11000, audio: 11001) unless network conflicts require different values
7979
6. **Render Delay:** Adjust frame buffering (0-100 frames, default 3) to smooth UDP packet loss/reordering
@@ -90,7 +90,7 @@ Once configured, live video and audio streams from the C64 Ultimate will be avai
9090

9191
### Ultimate Device Setup 🎛️
9292

93-
**Automatic Configuration (Recommended):** The OBS plugin automatically controls streaming on the Ultimate device. When you configure the Ultimate's IP address in the OBS plugin settings, the plugin tells the Ultimate device where to send streams and sends start commands automatically. Thus, no manual streaming adjustments are needed on the Ultimate device.
93+
**Automatic Configuration (Recommended):** The OBS plugin automatically controls streaming on the Ultimate device. When you configure the Ultimate's hostname or IP address in the OBS plugin settings, the plugin tells the Ultimate device where to send streams and sends start commands automatically. Thus, no manual streaming adjustments are needed on the Ultimate device.
9494

9595
**Manual Configuration:**
9696
1. Press F2 to access the Ultimate's configuration menu
@@ -102,6 +102,30 @@ Once configured, live video and audio streams from the C64 Ultimate will be avai
102102

103103
For comprehensive configuration details, refer to the [official C64 Ultimate documentation](https://1541u-documentation.readthedocs.io/en/latest/data_streams.html).
104104

105+
### Hostname vs IP Address 🌐
106+
107+
The plugin supports both **hostnames** and **IP addresses** for the C64U Host field:
108+
109+
**Using Hostnames (Recommended):**
110+
- **Default:** `c64u` - The plugin will try to resolve this hostname to an IP address
111+
- **Custom:** `my-c64u` or `retro-pc` - Use any hostname your C64 Ultimate device is known by
112+
- **FQDN Support:** The plugin automatically tries both `hostname` and `hostname.` (with trailing dot) for proper DNS resolution
113+
114+
**Using IP Addresses:**
115+
- **Direct IP:** `192.168.1.64` - Standard IPv4 address format
116+
- **Fallback:** `0.0.0.0` - Accept streams from any C64 Ultimate (no automatic control)
117+
118+
**How it Works:**
119+
1. Plugin first checks if the input is already a valid IP address
120+
2. If not, it attempts DNS resolution of the hostname as-is
121+
3. If that fails, it tries FQDN resolution with a trailing dot (e.g., `c64u.`)
122+
4. If hostname resolution fails, the plugin logs a warning but continues using the hostname as-is
123+
124+
**Examples:**
125+
- `c64u` → resolves to `192.168.1.64` (automatic)
126+
- `192.168.1.64` → used directly as IP address
127+
- `retro-basement.local` → resolves via mDNS/Bonjour
128+
- `ultimate64` → tries both `ultimate64` and `ultimate64.` for resolution
105129

106130
## Recording Features 📹
107131

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# PowerShell script to install C64U plugin to OBS Studio on Windows
2+
# This script creates the necessary directory structure and copies the plugin files
3+
4+
$PluginPath = "$env:APPDATA\obs-studio\plugins\c64u-plugin-for-obs"
5+
$BinPath = "$PluginPath\bin\64bit"
6+
$DataPath = "$PluginPath\data"
7+
8+
# Create directories
9+
Write-Host "Creating plugin directories..."
10+
New-Item -ItemType Directory -Force -Path $BinPath | Out-Null
11+
New-Item -ItemType Directory -Force -Path $DataPath | Out-Null
12+
13+
# Copy plugin DLL
14+
$SourceDll = "build_x64\Debug\c64u-plugin-for-obs.dll"
15+
$TargetDll = "$BinPath\c64u-plugin-for-obs.dll"
16+
17+
if (Test-Path $SourceDll) {
18+
Write-Host "Copying plugin DLL: $SourceDll -> $TargetDll"
19+
Copy-Item $SourceDll $TargetDll -Force
20+
} else {
21+
Write-Error "Plugin DLL not found: $SourceDll"
22+
Write-Error "Make sure to build the plugin first with: cmake --build build_x64 --config Debug"
23+
exit 1
24+
}
25+
26+
# Copy data files (locale and images)
27+
if (Test-Path "data") {
28+
Write-Host "Copying plugin data files..."
29+
Copy-Item "data\*" $DataPath -Recurse -Force
30+
} else {
31+
Write-Warning "Data directory not found, plugin may not work correctly"
32+
}
33+
34+
Write-Host "Plugin installed successfully to: $PluginPath"
35+
Write-Host "You can now launch OBS Studio to test the plugin"

data/locale/de-DE.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# German localization for C64U Plugin
22
# Source name and descriptions
3-
C64UDisplay="C64U-Anzeige"
3+
C64UDisplay="C64U"
44

55
# Properties dialog sections
66
DebugLogging="Debug-Protokollierung"
77
DebugLogging.Description="Detaillierte Protokollierung zur Fehlerbehebung bei Verbindungsproblemen aktivieren"
88

99
NetworkConfiguration="Netzwerkkonfiguration"
1010

11-
C64UltimateIP="C64 Ultimate IP"
12-
C64UltimateIP.Description="IP-Adresse oder DNS-Name des C64 Ultimate-Geräts (0.0.0.0 verwenden, um Steuerbefehle zu überspringen)"
11+
C64UHost="C64U Host"
12+
C64UHost.Description="Hostname or IP address of C64 Ultimate device (default: c64u). Use 0.0.0.0 to skip control commands."
1313

1414
OBSMachineIP="OBS-Server IP"
1515
OBSMachineIP.Description="IP-Adresse dieses OBS-Servers (wohin C64 Ultimate Streams sendet)"

data/locale/en.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# English localization for C64U Plugin
22
# Source name and descriptions
3-
C64UDisplay="C64U Display"
3+
C64UDisplay="C64U"
44

55
# Properties dialog sections
66
DebugLogging="Debug Logging"
77
DebugLogging.Description="Enable detailed logging for debugging connection issues"
88

99
NetworkConfiguration="Network Configuration"
1010

11-
C64UltimateIP="C64 Ultimate IP"
12-
C64UltimateIP.Description="IP address or DNS name of C64 Ultimate device (use 0.0.0.0 to skip control commands)"
11+
C64UHost="C64U Host"
12+
C64UHost.Description="Hostname or IP address of C64 Ultimate device (default: c64u). Use 0.0.0.0 to skip control commands."
1313

1414
OBSMachineIP="OBS IP"
1515
OBSMachineIP.Description="IP address of this OBS server (where C64 Ultimate sends streams)"

data/locale/es-ES.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Spanish localization for C64U Plugin
22
# Source name and descriptions
3-
C64UDisplay="Pantalla C64U"
3+
C64UDisplay="C64U"
44

55
# Properties dialog sections
66
DebugLogging="Registro de depuración"
77
DebugLogging.Description="Habilitar registro detallado para depurar problemas de conexión"
88

99
NetworkConfiguration="Configuración de red"
1010

11-
C64UltimateIP="IP C64 Ultimate"
12-
C64UltimateIP.Description="Dirección IP o nombre DNS del dispositivo C64 Ultimate (usar 0.0.0.0 para omitir comandos de control)"
11+
C64UHost="C64U Host"
12+
C64UHost.Description="Hostname or IP address of C64 Ultimate device (default: c64u). Use 0.0.0.0 to skip control commands."
1313

1414
OBSMachineIP="IP OBS"
1515
OBSMachineIP.Description="Dirección IP de este servidor OBS (donde C64 Ultimate envía transmisiones)"

data/locale/fr-FR.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# French localization for C64U Plugin
22
# Source name and descriptions
3-
C64UDisplay="Affichage C64U"
3+
C64UDisplay="C64U"
44

55
# Properties dialog sections
66
DebugLogging="Journalisation de débogage"
77
DebugLogging.Description="Activer la journalisation détaillée pour déboguer les problèmes de connexion"
88

99
NetworkConfiguration="Configuration réseau"
1010

11-
C64UltimateIP="IP C64 Ultimate"
12-
C64UltimateIP.Description="Adresse IP ou nom DNS du dispositif C64 Ultimate (utiliser 0.0.0.0 pour ignorer les commandes de contrôle)"
11+
C64UHost="C64U Host"
12+
C64UHost.Description="Hostname or IP address of C64 Ultimate device (default: c64u). Use 0.0.0.0 to skip control commands."
1313

1414
OBSMachineIP="IP OBS"
1515
OBSMachineIP.Description="Adresse IP de ce serveur OBS (où C64 Ultimate envoie les flux)"

0 commit comments

Comments
 (0)