Compare commits

...

6 Commits
0.3.1 ... 0.3.2

Author SHA1 Message Date
d519815a7e Bump to 0.3.2 2016-12-10 21:15:24 +01:00
32932eacf5 Fixes #18 2016-12-04 20:38:49 +01:00
1a057cf5a3 Merge branch 'master' of github.com:Palakis/obs-websocket 2016-12-04 20:24:20 +01:00
e3936dad9b Updated installer 2016-12-04 20:23:59 +01:00
4ec9b85506 Update README.md 2016-12-01 12:43:56 +01:00
fbae081c33 Added installer 2016-11-30 20:49:08 +01:00
5 changed files with 73 additions and 4 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
/build/ /build/
/build32/ /build32/
/build64/ /build64/
/release/
/installer/Output/

View File

@ -3,7 +3,7 @@ obs-websocket
Websocket API for OBS Studio. Websocket API for OBS Studio.
## Downloads ## Downloads
Binaries for Windows are available in the [Releases](https://github.com/Palakis/obs-websocket/releases) section. Linux and OS X releases coming soon. Binaries for Windows and Linux are available in the [Releases](https://github.com/Palakis/obs-websocket/releases) section.
## Using obs-websocket ## Using obs-websocket
The Websocket API server runs on port 4444 and a settings window is available in "Websocket server settings" under OBS' "Tools" menu. The obs-websocket protocol is documented in [PROTOCOL.md](PROTOCOL.md). The Websocket API server runs on port 4444 and a settings window is available in "Websocket server settings" under OBS' "Tools" menu. The obs-websocket protocol is documented in [PROTOCOL.md](PROTOCOL.md).

View File

@ -92,15 +92,28 @@ void WSEvents::broadcastUpdate(const char *updateType, obs_data_t *additionalFie
void WSEvents::OnSceneChange() { void WSEvents::OnSceneChange() {
// Implements an existing update type from bilhamil's OBS Remote // Implements an existing update type from bilhamil's OBS Remote
// Default behavior : get the new scene from the running transition
obs_source_t *transition = obs_frontend_get_current_transition(); obs_source_t *transition = obs_frontend_get_current_transition();
obs_source_t *new_scene = obs_transition_get_source(transition, OBS_TRANSITION_SOURCE_B); obs_source_t *new_scene = obs_transition_get_source(transition, OBS_TRANSITION_SOURCE_B);
if (!new_scene) { if (!new_scene) {
obs_source_release(transition); obs_source_release(transition);
return; return;
} }
const char *scene_name = obs_source_get_name(new_scene);
if (!scene_name) {
// Fallback behaviour : get the new scene straight from the API
obs_source_release(new_scene);
new_scene = obs_frontend_get_current_scene();
if (new_scene) {
scene_name = obs_source_get_name(new_scene);
}
}
obs_data_t *data = obs_data_create(); obs_data_t *data = obs_data_create();
obs_data_set_string(data, "scene-name", obs_source_get_name(new_scene)); obs_data_set_string(data, "scene-name", scene_name);
broadcastUpdate("SwitchScenes", data); broadcastUpdate("SwitchScenes", data);

54
installer/installer.iss Normal file
View File

@ -0,0 +1,54 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "obs-websocket"
#define MyAppVersion "0.3.1"
#define MyAppPublisher "St<53>phane Lepin"
#define MyAppURL "http://github.com/Palakis/obs-websocket"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{117EE44F-48E1-49E5-A381-CC8D9195CF35}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetDirName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=obs-websocket-{#MyAppVersion}-Windows-Installer
Compression=lzma
SolidCompression=yes
LicenseFile=..\LICENSE
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
[Files]
Source: "..\release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[Code]
// credit where it's due :
// following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45
function GetDirName(Value: string): string;
var
InstallPath: string;
begin
// initialize default path, which will be returned when the following registry
// key queries fail due to missing keys or for some different reason
Result := '{pf}\obs-studio';
// query the first registry value; if this succeeds, return the obtained value
if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then
Result := InstallPath
end;

View File

@ -19,6 +19,6 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#ifndef OBSWEBSOCKET_H #ifndef OBSWEBSOCKET_H
#define OBSWEBSOCKET_H #define OBSWEBSOCKET_H
#define OBS_WEBSOCKET_VERSION "0.3.1" #define OBS_WEBSOCKET_VERSION "0.3.2"
#endif // OBSWEBSOCKET_H #endif // OBSWEBSOCKET_H