Commit Graph

241 Commits (71130137f35b48a3f61f1ca963df36bc51d14836)

Author SHA1 Message Date
cg2121 2e18745c37 UI: Uncheck record/replay buffer buttons if fail
Closes obsproject/obs-studio#1375
2018-07-31 21:35:06 -07:00
jp9000 b6665f9cc0 UI: Use QScopedPointer (not QPointer) where applicable
Contrary to what the name would have you believe, QPointer<> is not used
to delete a pointer when it leaves its specific scope.  Instead, it's
used to check to see if the pointer is still valid.  For most
QWidget-based objects, this is actually fine because QWidgets that are
assigned to layouts or other widgets will automatically be destroyed --
however, for non-widget objects, this can cause a memory leak.

This patch replaces QPointer with QScopedPointer where applicable to
prevent memory leaks.

Closes obsproject/obs-studio#1367
2018-07-31 21:14:52 -07:00
cg2121 8f4edede4a UI: Add confirmation dialog if there are no sources
This adds a confirmation dialog for streaming or recording if
there are no sources.

Closes obsproject/obs-studio#1344
2018-07-31 04:28:43 -07:00
jp9000 a032bcc798 UI: Add intro startup page (windows)
Allows the ability to show a web page via CEF to the users on startup to
present and announce new features.
2018-07-29 23:32:23 -07:00
Richard Stanway 2d60c89a02
UI: Only allow stream/record hotkeys if the UI buttons are enabled
Currently the only thing preventing a user from trying to start multiple
streams or recordings is the UI buttons being disabled. The hotkey code
allowed the user to bypass that, which for streaming resulted in lots of
rtmp output connect threads spawning, which stomped all over each
other's data structures and resulted in crashes.
2018-07-28 15:27:49 +02:00
Shaolin be8189b0f8 UI: Fix start up crash with saved projectors
This fixes a crash in case the user selected the option to save
projectors on exit and had multiple monitors at that time. Later on,
when obs is started again if the monitor list is lower now the open
projector code will return null when trying to create the saved
projector.

Just check if the returned projector pointer is valid before trying
to restore the saved geometry.
2018-07-24 17:43:58 -03:00
jp9000 7ef3350d50 UI: Do not open properties dialog for groups
On initial creation of an empty group, do not open a properties dialog
for groups.
2018-07-24 02:41:31 -07:00
Jim 75d460b2e8
Merge pull request #1353 from cg2121/fix-checkable-buttons
UI: Fix stream button checkable state
2018-07-18 01:28:49 -07:00
jp9000 573d5719d8 UI: Fix signals for sub-items of groups
Because sub-items of groups can no longer reroute their signals to the
parent scenes of groups, delegates removal handling to SourceTreeItem
instead of OBSBasic.
2018-07-16 19:03:34 -07:00
jp9000 b4f345680f UI: Allow copying/pasting of groups
Allows copying and pasting of groups.  The user can fully duplicate the
group, or create a reference of the group.  The user cannot paste a
reference of the group if it already exists within the same scene
however.
2018-07-16 19:03:34 -07:00
jp9000 5993834815 libobs: Change groups to actual public types
(This commit also modifies UI)

Changes groups to their own independent type, "group".  This allows them
to be used like other regular types, and allows the ability to reference
groups in multiple scenes.  Before, a group would always be linked to
the scene it was in.  This made it cumbersome for users to modify groups
if they had a similar group in multiple scenes (they would have to
modify each group in each scene).  Making groups like other source types
makes more sense to solve this issue so they can be referenced in
multiple scenes at once.  This also removes a significant amount of
group-specific handling code required for implementing groups in the
front-end.

One limitation however: due to the way sub-items of groups are
seamlessly modifiable and sortable as part of the whole scene, the user
cannot have multiple references to the same group within one scene.
2018-07-16 19:01:51 -07:00
jp9000 35704c4c04 libobs: Remove group_sceneitem from obs_scene struct
(This commit also modifies UI)

Removes obs_scene::group_sceneitem and replaces it with
obs_scene::is_group.  Changes a number of other functions related to
groups so that a group is not inherently tied to a specific scene, and
helps allow a single group to be referenced in multiple scenes if
desired.
2018-07-15 19:01:14 -07:00
cg2121 cfa427c44f UI: Fix stream button checkable state
This fixes an issue where the stream button would still be
checked when clicking no on the stream confirmation dialog.
2018-06-27 23:11:10 -05:00
Colin Edwards 618a1c5faf UI: Add frontend event for when OBS finishes loading 2018-06-26 22:14:05 -05:00
Jim cd70c2e037
Merge pull request #1292 from pkviet/leaks
Fix several mem leaks
2018-06-17 20:54:10 -07:00
Shaolin d7fd29351f UI: Fix mixer dock widget minSize being too big
When the vertical volume meter was introduced it set in the OBSBasic.ui
mixer dock definition a min width/height that was valid for both
widgets. QStackedWidget hints the minimum size as the higher w/h
of its children so this workaround is necessary.
2018-06-12 23:25:38 -03:00
pkviet 7f3464c8ce UI: Fix mem leak with multiview projector menu 2018-06-07 00:44:28 +02:00
pkviet 340c2e5fb7 UI: Fix mem leak with tray menu 2018-06-07 00:44:28 +02:00
craftwar 36d893db03 UI: Compact ClearVolumeControls()
Closes obsproject/obs-studio#1296
2018-06-05 14:46:02 -07:00
jp9000 88b6c63964 UI: Add grouping 2018-06-04 04:01:39 -07:00
jp9000 c7897acddf UI: Use vector value for nudge callback 2018-06-03 15:04:39 -07:00
jp9000 4fd22f1316 UI: Move frontend API initialization to constructor 2018-06-03 15:04:39 -07:00
jp9000 b46fab87b2 UI: Fix a few unused lambda closure captures 2018-06-03 07:24:59 -07:00
Shaolin 177ce13655 UI: Update multiview on scene list reorder 2018-05-20 23:20:52 -03:00
Shaolin 09135d6917 UI: Update multiview on resolution change 2018-05-20 23:20:52 -03:00
Shaolin 32ee7ee4e2 UI: Clean up Projector Creation
The Init function were only called on projector creation so this isn't
needed to be on a separate function. Its clearer to read the code.
2018-05-20 23:20:52 -03:00
Shaolin c7c328dc83 UI: Add Vertical Mixer option 2018-05-19 00:17:58 -03:00
Richard Stanway b0bb067ba8
Use obsproject.com for log file uploads 2018-05-18 15:33:53 +02:00
Jim f1c1abce55
Merge pull request #1297 from Palakis/preview-scene-event-fix
UI: Fix OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED
2018-05-15 00:14:34 -07:00
jp9000 f81d106b2a UI: Fix OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED
OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED is supposed to be called
whenever the user changes the current preview scene -- it was almost
never being triggered.
2018-05-15 00:49:12 +02:00
jp9000 d0cc0cc60e UI: Always enable auto-updater for windows
Makes it so the auto-updater does not have to rely on a cmake variable
being set.  Fixes a bug where deployment could accidentally be built
without the auto-updater being enabled.
2018-05-12 17:02:34 -07:00
Ilya Melamed 3eec139b2e UI: Use WaitConnection() when adding scenes
Instead of queuing AddScene to add the new scene to the list box,
ensures that the UI has added the new scene to the list box when the new
scene is added.  This ensures synchronization between the calling thread
and the UI thread in this particular case.

(Jim: Added detailed commit message description)

Closes obsproject/obs-studio#1226
2018-05-04 15:38:59 -07:00
Ilya Melamed 2d9691fc23 UI: Use "source_create" to add scenes to listbox
Instead of manually having to call AddScene each time a scene needs to
be added, use the "source_create" global OBS signal to detect when a
scene has been created, and add the scene to the list automatically.
Allows the ability to add scenes to the main user interface via libobs
API.

Closes obsproject/obs-studio#1226
2018-05-04 11:47:54 -07:00
jp9000 72636ca976 UI: Don't defer load on non-macOS systems
Deferred load is used specifically for macOS systems to ensure that Qt
and CEF do not load at the same time.  This causes a slight bit of a
delay in loading the scene after the UI has loaded.  This is not
necessary for other operating systems, so revert to the older load code
in the case of different systems.
2018-05-01 12:01:11 -07:00
jp9000 e9d22bdbd6 UI: Also defer first scene collection load
Fixes a bug where it would try to save the scene before the scene had
been loaded on macOS.
2018-05-01 12:00:17 -07:00
Tjienta Vara b0f94afaf2 libobs, UI: Add true peak measurements
Add a new algorithm to calculate the true-peak. It implements the
Whittaker- Shannon interpolation from four samples to create 4
intermediate samples (5 x oversampling) inbetween the middle two
samples.

With 4 samples and 4 intermediate samples the algorithm can be
implemented as a 4x4 vector-matrix cross product, which is ideal for
SSE.

I've also replaced the sample-peak algorithm using SSE as well to
improve performance.

Closes obsproject/obs-studio#1189
2018-04-30 03:53:26 -07:00
Cephas Reis ef41dc53e8 UI: Change remux dialog to be non-modal
Closes obsproject/obs-studio#1266
2018-04-25 06:30:00 -07:00
Jim 9a1c27accb
Merge pull request #1262 from Andersama/patch-12
UI: Disable paste filters unless a source is selected
2018-04-22 23:59:12 -07:00
Alex Anderson 22520c222c UI: Disable paste filters unless a source is selected
Fixes the paste filters right click option to behave like copy.

See: https://obsproject.com/mantis/view.php?id=1220
and #1261
2018-04-22 12:39:31 -07:00
Igor Bochkariov 61839d8c94 UI: Sort audio controls by source name
Audio controls in OBS Mixer and Advanced Audio Properties window are not
sorted at all.  Every time OBS is restarted they get shuffled (Jim note:
This is due to json object hashing).  The order of these controls is
additionally not consistent between the mixer and the advanced audio
properties window.

Closes obsproject/obs-studio#1242
2018-04-20 19:49:26 -07:00
Shaolin 234ed9512d UI: Clean up delete Source/Scene shortcut
The "Delete" shortcut is already set in the UI/forms so the old code
would only change shortcuts in macOS.

Closes obsproject/obs-studio#1212
2018-04-19 21:54:01 -07:00
Murnux 273f5e2bfe UI: Don't close windows for "Always on Top" (win32)
On windows, the "Always on top" state can safely be used without closing
dialogs.

Closes obsproject/obs-studio#1207
2018-04-19 20:47:30 -07:00
jp9000 4fcc2cccfe UI: Move OpenSavedProjecters call to OBSBasic::Load()
Due to the commit 34c14829b6, source loading is now deferred
to after OBSInit(), which would cause saved scene/source projectors to
no longer load on startup.  This fixes that issue by moving the
OpenSavedProjectors call to OBSBasic::Load().
2018-04-18 19:34:18 -07:00
Jim 7481f5b389
Merge pull request #1195 from admshao/fix-save-projectors-on-exit
Save Windowed Projectors on exit
2018-04-18 19:33:49 -07:00
jp9000 34c14829b6 UI: Defer startup OBSBasic::Load (macOS CEF workaround)
Adds an alternative means of isolating the CEF initialization process
from Qt's initialization process.  This is an unpleasant hack, but is
far more preferable than isolating the entire browser plugin to a
separate process and overly complexifying the browser plugin to the
point to where no one wants to touch the plugin or contribute to it.
2018-04-12 13:42:15 -07:00
Ilya M 439b9e4d15 UI: Add frontend API to defer saving
Allows the ability to perform multiple actions that would normally save,
and defer the save until all of those actions are complete.

Closes obsproject/obs-studio#1231
2018-04-06 17:34:10 -07:00
Shaolin 9211dba267 UI: Save windowed projectors on exit 2018-03-18 05:11:44 -03:00
Shaolin 3390be50ce UI: Remove a second call to OpenSavedProjectors
OpenSavedProjectors is already called from RefreshSceneCollections
earlier by OBSInit.
2018-03-18 05:11:44 -03:00
Shaolin 8b6641d1a8 UI: Clean up OBSProjector creation 2018-03-18 05:11:44 -03:00
Shaolin 372640ff35 UI: Update Projectors title on source name change 2018-03-18 05:11:44 -03:00
Shaolin 76af4ff36d UI: Clean up save and load projector code 2018-03-18 05:11:44 -03:00
Shaolin c605f74d3f UI: Make OpenSavedProjectors indentation clear 2018-03-18 05:11:44 -03:00
Shaolin 2d864590fe UI: Fix the Multiview window not using translation 2018-03-18 05:11:44 -03:00
Shaolin cfc2c1373d UI: Check if source is valid earlier 2018-03-18 05:11:44 -03:00
Shaolin d13b4d35a0 UI: Simplify the OpenProjector logic 2018-03-18 05:11:44 -03:00
Shaolin dd5e3ef3fe UI: Only load projectors if SaveProjectors is true 2018-03-18 05:11:44 -03:00
jp9000 3b64610717 UI: Add Help -> Crash Reports submenu
Adds the ability to upload crash reports, making it easier for users to
give us crash data.  This should be considered a temporarily solution,
as automated crash reporting should be the ideal solution as soon as
time permits.
2018-03-16 16:27:49 -07:00
jp9000 341bd9bcec UI: Add subdir param to OBSBasic::UploadLog
Allows the ability to get log files from other configuration
subdirectories (i.e. "%appdata%/obs-studio/crashes")
2018-03-16 16:22:37 -07:00
Jim 89c81933d4
Merge pull request #1219 from cg2121/linux-delete-checkforupdates
UI: Remove check for updates on Linux
2018-03-15 17:43:13 -07:00
Jim a960994ced
Merge pull request #1225 from admshao/refresh-projector-monitor-list
Refresh projector display list
2018-03-15 17:41:25 -07:00
VodBox 840f9b7d3c UI: Replace gist with hastebin for log uploads 2018-03-16 11:19:03 +13:00
Shaolin 229feefbb9 UI: Refresh multiview projector menu per click 2018-03-15 04:24:20 -03:00
Shaolin 39a40764e6 UI: Refresh system tray projector menu per click 2018-03-14 21:41:15 -03:00
Shaolin 179cbd48f0 UI: Remove unnecessary casts 2018-03-14 21:41:15 -03:00
cg2121 4d478c5ca5 UI: Remove check for updates on Linux 2018-03-12 19:56:07 -05:00
Michel 70fdd17287 UI: Fix grayed out Copy option in sources context menu
This fixes a problem introduced in #1050 where the Copy option would
be grayed out when rightclicking a source above the currently selected
source. This also retains the functionality of not having the Copy option
enabled when no source is selected.
2018-01-31 21:01:46 +01:00
jp9000 bd0983a89e UI: Add simple output mode encoder fallback
Prevents simple output mode from getting stuck on an encoder that may
not be available suddenly for whatever reason (system device changes,
driver issues, etc).  If the encoder is no longer available, falls back
to x264 to ensure that the user can continue to use the program.
2018-01-20 13:58:02 -08:00
Shaolin 53d936c5dc UI: Add audio meter decay rate option
The decay rate of the audio meters can now be selected in the audio
settings.  The values are:

- "Fast"   (OBS default, 40 dB / 1.7s)
- "Medium" (Type I PPM,  20 dB / 1.7s)
- "Slow"   (Type II PPM, 24 dB / 2.8s)

Closes jp9000/obs-studio#1143
2018-01-19 05:49:21 -08:00
Jim 619618ac8d
Merge pull request #1129 from Fenrirthviti/help-menu
UI: Add help portal link to help menu
2018-01-05 14:08:35 -08:00
Joel Bethke 2959b22bfb UI: Add help portal link to help menu 2018-01-05 15:20:39 -06:00
pkviet 67e48ecc2c libobs/media-io: Replace quad with 4.0
(also obs, deps/media-playback, libobs/audio-monitoring, decklink,
linux-alsa, linux-pulseaudio, mac-capture, obs-ffmpeg, win-dshow,
win-wasapi)

Default channel layout for 4 channels is 4.0 in FFmpeg.
Replacing quad with 4.0 will improve compatibility since FFmpeg has
better support of its default channel layouts.
2018-01-05 09:48:52 -08:00
SuslikV f81adbd856 libobs: Fix bad source release placement
(This commit also modifies the UI)

The source release was being done in the wrong file.
2018-01-04 20:36:11 -08:00
jp9000 2de3973fae UI: Allow temporarily disabling filter/source types
Implements the OBS_SOURCE_CAP_DISABLE capability flag in to the user
interface.
2018-01-03 17:04:04 -08:00
jp9000 6cd79f8105 UI: Add scene collection cleanup event to frontend API
This event is called when all scene data has been unloaded.
2018-01-03 17:04:03 -08:00
jp9000 518290c404 UI: Trigger scene change event on scene collection load
When the program first starts up, or rather when a scene collection is
loaded, the frontend API OBS_FRONTEND_EVENT_SCENE_CHANGED event would
not get triggered.
2018-01-03 17:04:03 -08:00
jp9000 5645c02c8f UI: Add preload callbacks to frontend API
Allows loading data before actually loading any scene data.
2018-01-03 17:04:03 -08:00
jp9000 7f6cf97bd7 libobs: Add obs_render_main_texture
(Note: This commit also modifies UI and test)

This makes it so that main preview panes are rendered with the main
output texture rather than re-rendering the main view.  The view will
render all objects again, whereas the output texture will be a single
texture render of the same exact thing.

Also fixes some abnormal artifacting when scaling the main preview pane.
2018-01-01 18:52:47 -08:00
jp9000 8a38d8e60e UI: Move multiview options to view menu
Moves the multiview (fullscreen/window) options to the view menu to
reduce context menu clutter, and allow using it even when not in studio
mode.

Also adds missing translation strings.
2017-12-02 16:12:03 -08:00
Shaolin 721cb3dea5 UI: Add Multiview projector
Jim note:

- Refactored code significantly
- Added a context menu option to exclude specific scenes from projectors
- Made it so multiview projectors update when scenes are
  added/removed/renamed
- Increased text quality
- Removed the color sources and replaced them with simple solid
  rectangles
- Increased the border size of "program" and "preview" scenes in the
  lower scene list

Closes jp9000/obs-studio#1068
2017-12-01 12:14:02 -08:00
jp9000 6461b63623 UI: Fix preview/program projectors being swapped
If a preview projector was created in normal mode, it would become a
studio projector in studio mode.  The window title of the window
projector would reflect that it was in fact a preview projector and not
a program projector.
2017-11-30 06:17:07 -08:00
cg2121 60e1d7e90b UI: Implement per-scene transition overriding
Allows the ability to override what specific transition a scene may use
when transitioning to it.

(Original proposal by cg2121, reworked by Jim)

Closes jp9000/obs-studio#1052
2017-11-30 05:10:25 -08:00
jp9000 b5c036974f UI: Fix studio program projectors
The studio mode program view projectors used the wrong saving mechanism.
The save data was copied from the source projectors, which were
dependent on string values, where as it should have been using a boolean
true/false value for specific monitors.
2017-11-29 23:11:38 -08:00
Ryan Foster f140104da8 UI: Add Studio Mode layout option for portrait mode displays
This commit adds a checkbox to general setting to allow users to enable
a vertically oriented layout for studio mode.

This commit addresses mantis issue 827:
https://obsproject.com/mantis/view.php?id=827

Closes jp9000/obs-studio#1072
2017-11-28 22:24:57 -08:00
Ryan Foster 9fce162137 UI: Add Studio Preview Projector
This commit allows a user to create projectors for the preview scene
instead of the program/live scene.

Close jp9000/obs-studio#1071
2017-11-27 00:28:03 -08:00
cg2121 3a43a047d4 UI: Add transition on double-click studio mode option
This adds the ability to switch to a scene by double-clicking it when in
studio mode.

(Edit by Jim: In case this change is undesired by the user, this has
been changed to be an option in general settings; disabled by default)

Closes jp9000/obs-studio#1029
2017-11-26 19:05:50 -08:00
pkviet bbac3280c1 libobs: Add surround sound audio support
(This commit also modifies the following modules: UI,
deps/media-playback, coreaudio-encoder, decklink, linux-alsa,
linux-pulseaudio, mac-capture, obs-ffmpeg, obs-filters, obs-libfdk,
obs-outputs, win-dshow, and win-wasapi)

Adds surround sound audio support to the core, core plugins, and user
interface.

Compatible streaming services: Twitch, FB 360 live
Compatible protocols: rtmp / mpeg-ts tcp udp
Compatible file formats: mkv mp4 ts  (others untested)
Compatible codecs: ffmpeg aac, fdk_aac, CoreAudio aac,
		   opus, vorbis, pcm (others untested).
Tested streaming servers: wowza, nginx
	 HLS, mpeg-dash : surround passthrough
Html5 players tested with live surround:
	 videojs, mediaelement, viblast (hls+dash), hls.js
Decklink: on win32, swap channels order for 5.1 7.1
         (due to different channel mapping on wav, mpeg, ffmpeg)
Audio filters: surround working.
Monitoring: surround working (win macOs linux (pulse-audio)).
VST:	 stereo plugins keep in general only the first two channels.
	 surround plugins should work (e.g. mcfx does).
OS: win, macOs, linux (alsa, pulse-audio).
Misc: larger audio bitrates unlocked to accommodate more channels
NB: mf-aac only supports mono and stereo + 5.1 on win 10
         (not implemented due to lack of usefulness)

Closes jp9000/obs-studio#968
2017-11-26 03:41:53 -08:00
jp9000 573fbbfead UI: Fix a memory leak when renaming mixer sources 2017-11-26 02:30:26 -08:00
cg2121 e86754c2a0 UI: Add ability to rename audio sources from the mixer
This adds the ability for users to change the names of audio sources
from the mixer including desktop and mic/aux sources.

Closes jp9000/obs-studio#1055
2017-11-25 00:59:01 -08:00
Jim a63028dd9c
Merge pull request #1051 from RytoEX/add-frontend-replay-buffer-save
UI: Add Frontend API function to save replay buffer
2017-11-24 22:41:54 -08:00
Jim 5d5da2a380
Merge pull request #1050 from RytoEX/disable-copy-with-no-source
UI: Disable source copy if no sources are selected
2017-11-24 22:40:56 -08:00
nleseul d22a75401d UI: Make streaming/recording buttons checkable
This makes it so the buttons appear "pressed" while streaming/recording
to more visibly help indicate that they are currently active.

Closes jp9000/obs-studio#1039
2017-11-23 00:54:06 -08:00
Ryan Foster 44b3cde9da UI: Add Frontend API function to save replay buffer 2017-10-19 07:16:00 -04:00
Ryan Foster c8353c90b6 UI: Disable source copy if no sources are selected
This commit addresses Mantis Bug 993. If no source was selected, the
"Copy" context menu item was enabled, but selecting it would do nothing.
This commit disables that menu item when no sources are selected.
2017-10-17 19:22:07 -04:00
cg2121 0e0db29d80 UI: Fix Pulse Audio not loading saved device 2017-10-16 17:28:50 -05:00
Ryan Foster 0fe4688a34 UI: Disallow pasting duplicates of sources with DO_NOT_DUPLICATE
This commit prevents users from being able to use the "Paste
(Duplicate)" context menu option after copying a source that has the
OBS_SOURCE_DO_NOT_DUPLICATE flag set. Though OBS would correctly paste
the source as a reference, it seems that this behavior was confusing
some users. This fixes Mantis Bug 1034.
2017-10-14 05:05:16 -04:00
Richard Stanway 8e66f180d8
UI: Add missing text for replay buffer hotkey log 2017-10-12 17:49:02 +02:00
Richard Stanway 5c9d3dd30d
UI: Log when starting / stopping via hotkey or timer
This will help resolve incidents where users accidentally started or
stopped their stream without knowing what triggered it (usually from
hotkeys that were forgotten about).
2017-10-12 17:23:56 +02:00
jp9000 3dc96fbe43 UI: Add ini option to use different graphics adapters
Allows setting a specific graphics adapter index to use for Direct3D 11.
This is currently meant to be sort of "undocumented" in implementing it
this way due to the fact that users will be guaranteed to break their
configurations if this is implemented in the UI (even if in advanced
settings).
2017-10-07 03:05:57 -07:00
Benjamin Schubert 9cba5660e4 UI: Enable Replay Buffer in Advanced Mode
Replay buffer is currently only supported in simple mode.  This change
adds support to advanced mode and is, for the most part, a mirror of the
addition of replay buffer to simple mode.

Mantis-bug: https://obsproject.com/mantis/view.php?id=792

Closes jp9000/obs-studio#1019
2017-09-16 05:55:18 -07:00
Jim 1e1808dbd9 Merge pull request #1005 from SuslikV/patch-1
UI: Fix parent window geometry loading
2017-09-15 10:30:39 -07:00