forked from n-air-app/n-air-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* project: Directly access OBS in Renderer processes As we now have our own IPC framework, we no longer have to rely on electron's IPC framework to do our work for us. We can directly call things from any process, as long as that process is actually connected to the IPC server. For OBS IPC, this means a lot of data can be directly accessed without blocking both the renderer and main process, thus freeing up resources for more responsiveness and faster rendering. As a side effect, we might see lower CPU usage too. * app: Ensure environment variable is valid * obs-api: Fix formatting * main: Fix working directory and path.join * services/app: Fix shutdown crash and ensure env variable is valid
- Loading branch information
eddyStreamlabs
authored
Oct 12, 2018
1 parent
aaf0e21
commit 84ea031
Showing
19 changed files
with
117 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ import Vue from 'vue'; | |
import URI from 'urijs'; | ||
|
||
import { createStore } from './store'; | ||
import { ObsApiService } from './services/obs-api'; | ||
import { IWindowOptions, WindowsService } from './services/windows'; | ||
import { AppService } from './services/app'; | ||
import { ServicesManager } from './services-manager'; | ||
|
@@ -27,10 +26,18 @@ import ChildWindow from 'components/windows/ChildWindow.vue'; | |
import OneOffWindow from 'components/windows/OneOffWindow.vue'; | ||
|
||
const { ipcRenderer, remote } = electron; | ||
|
||
const slobsVersion = remote.process.env.SLOBS_VERSION; | ||
const isProduction = process.env.NODE_ENV === 'production'; | ||
|
||
window['obs'] = window['require']('obs-studio-node'); | ||
|
||
{ // Set up things for IPC | ||
// Connect to the IPC Server | ||
window['obs'].IPC.connect(remote.process.env.SLOBS_IPC_PATH); | ||
document.addEventListener('close', (e) => { | ||
window['obs'].IPC.disconnect(); | ||
}); | ||
} | ||
|
||
// This is the development DSN | ||
let sentryDsn = 'https://[email protected]/252950'; | ||
|
@@ -102,7 +109,6 @@ document.addEventListener('DOMContentLoaded', () => { | |
const servicesManager: ServicesManager = ServicesManager.instance; | ||
const windowsService: WindowsService = WindowsService.instance; | ||
const i18nService: I18nService = I18nService.instance; | ||
const obsApiService = ObsApiService.instance; | ||
const windowId = Utils.getCurrentUrlParams().windowId; | ||
|
||
if (Utils.isMainWindow()) { | ||
|
@@ -115,8 +121,6 @@ document.addEventListener('DOMContentLoaded', () => { | |
servicesManager.listenMessages(); | ||
} | ||
|
||
window['obs'] = obsApiService.nodeObs; | ||
|
||
storePromise.then(async store => { | ||
|
||
Vue.use(VueI18n); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.