Commit Graph

835 Commits (1755511b2f5afd95d6ae6657eff2e2ddc387f0bc)

Author SHA1 Message Date
jp9000 84567f2745 UI: Implement scene reordering
This simply saves/loads the actual list widget item order.

The reason why this is done is because internally, libobs doesn't have a
list of scenes, it only has a list of sources.  The list of scenes is
actually something artificially implemented by the basic window user
interface.
2015-06-25 03:55:33 -07:00
jp9000 19932f552a UI: Fix output mode name when setting defaults
The item in the [Output] section for the output mode is "Mode", not
"Type".
2015-06-25 01:06:46 -07:00
jp9000 f15965e721 UI: Add menu to visit website to basic main window 2015-06-25 01:02:47 -07:00
jp9000 c6a3287a16 UI: Remove unused actions from basic main window 2015-06-25 00:35:20 -07:00
jp9000 c618ac4e04 UI: Remove unused signals from basic main window 2015-06-25 00:23:17 -07:00
jp9000 94edb7f5d6 UI: Add warning if using no/multiple tracks
Certain output formats don't support multiple tracks, so it's important
to warn the user if they select multiple tracks.

Also warn the user if they select no tracks.
2015-06-21 22:34:58 -07:00
jp9000 556fde66ae UI: Warn user if recording format unsupported
If the recording format is unsupported or doesn't support multiple
tracks, warn the user to check their settings.
2015-06-21 22:34:54 -07:00
jp9000 2679c8c3ad UI: Remove "FLV" from "FLV Recording Path" text 2015-06-21 22:34:53 -07:00
jp9000 a24af63527 UI: Allow multi-track recording in advanced output 2015-06-21 22:34:52 -07:00
jp9000 d07664b129 UI: Add option to select recording format
Add a listboxes to recording to allow changing file formats (allows mp4,
mov, mkv, ts, flv)
2015-06-21 22:34:51 -07:00
jp9000 227508a72a UI: Use ffmpeg muxer instead of flv by default
This allows the ability to save different container formats, such as
mp4, mkv, and ts files.
2015-06-21 22:34:50 -07:00
jp9000 336cd7ebe9 UI: Fix bug with path property browse button
When the editable list property was added, I added a case to a switch
statement without putting a break on the case before it.
2015-06-21 03:54:00 -07:00
Jim 92cae0c511 Merge pull request #437 from kc5nra/fix-ffmpeg-output
UI: Fix settings reload selecting  wrong fmt/codec
2015-06-14 15:32:50 -07:00
John Bradley 11bb0fecf6 UI: Fix settings reload selecting wrong fmt/codec 2015-06-10 17:46:08 -05:00
Jim 859415943f Merge pull request #436 from ThoNohT/output-folder
Use correct output folder for Show/Remux
2015-06-09 17:32:28 -07:00
Palana 4a75f79af3 UI: Try CoreAudio AAC encoder first 2015-06-07 04:22:25 +02:00
Palana faa3f263ae UI: Move AAC encoder creation 2015-06-07 04:22:24 +02:00
jp9000 d16ec97f7b UI: Change default simple audio bitrate to 160
The audio bitrate required is insignificant relative to the video
bitrate, and due to the fact that it's possible that a lower-quality
encoder may be in use (such as FFmpeg's AAC encoder), setting the
default to 160 is really more ideal to reducee any potential quality
loss.
2015-06-05 08:57:01 -07:00
Eric Bataille e42aee5da9 UI: Use correct output folder for Show/Remux
Ensures that the "Show Recordings" an "Remux Recordings" file menu
items will open the recordings folder from the currently active
output mode rather than always the simple output mode.
2015-06-04 20:57:16 +02:00
jp9000 e7eaa268e5 UI: Add option to disable aero on windows vista/7
On windows vista/7, you cannot really use display capture efficiently
without disabling aero, so this will add an option to settings to allow
it to be disabled and cause it to be disabled on startup.
2015-06-02 19:18:15 -07:00
jp9000 0c631db046 UI: Add funcs to get windows ver. and disable aero
Adds two functions, GetWindowsVersion and SetAeroEnabled.
2015-06-02 17:02:54 -07:00
jp9000 9d1204a8bc UI: Add editable list property to properties view
Implemented as a multi-selection QListWidget.  Individual values in the
list are saved to the settings in an obs_data_array_t item.
2015-06-02 17:01:39 -07:00
jp9000 4b422d7d23 UI: Replace os_get_config_path with GetConfigPath
This allows the UI to be able to use a custom config path for cases such
as portable mode, where the config path is relative to the executable.
2015-06-01 16:42:30 -07:00
jp9000 ea3496e512 UI: Add support for portable mode
Portable mode can be enabled via command line options (--portable or -p)
or by having any of the following files present in the base directory of
a portable install:

portable_mode
obs_portable_mode
portable_mode.txt
obs_portable_mode.txt

Portable mode is omitted when obs is built with a unix program
structure.
2015-06-01 16:42:29 -07:00
jp9000 161198ba6c UI: Fix bug where password property won't save
In my recent update to add a "show" button to the passworded text
property, I neglected to connect the edit widget to
WidgetInfo::ControlChanged, so it isn't able to detect when the text is
changed by the user.
2015-05-30 03:13:41 -07:00
jp9000 cce2eb9387 UI: Add "Show" button to password text properties
Allows the user to be able to optionally toggle the password text if
they wish.  Mostly useful for troubleshooting purposes.
2015-05-24 22:26:51 -07:00
jp9000 5cb8916522 UI: Add dark theme 'checked' color to push buttons 2015-05-24 22:22:28 -07:00
jp9000 39d1cda4e9 UI: Remove dependence on Qt5Network
Qt5Network has been replaced by libcurl.
2015-05-24 16:20:14 -07:00
jp9000 13bed1a448 UI: Replace Qt5Network classes with libcurl
The Qt5Network classes seem to only support OpenSSL, and because OpenSSL
isn't available on windows, we would have to distribute it with the
program to get SSL access working.  The problem with that is that
OpenSSL is not GPL-compatible, so we cannot distribute OpenSSL with the
program, which means we have to find a better (and preferably superior)
library for accessing remote files that can use the windows SSPI for our
SSL needs, which comes with the operating system.

Fortunately, libcurl is probably the best library out there, and can be
compiled with SSPI instead of OpenSSL, so we're just going to switch to
libcurl instead.  Originally I thought it didn't support SSPI, otherwise
I would have implemented it sooner.

As a side note, this will make it so we'll able to get files from the
internet via plugins, which will be quite useful.
2015-05-24 16:20:13 -07:00
jp9000 72e3ec7b4c UI: Add RemoteTextThread class
The RemoteTextThread class is a QThread that is used to get text
remotely in a separate thread with libcurl.  This is intended to replace
the Qt5Network classes because of their dependency on OpenSSL, which we
can't distribute.
2015-05-24 16:20:12 -07:00
Palana ee055b5799 UI: Make settings -> 'Audio' source list expand vertically
Reduces required scrolling when lots of new audio sources are added
(e.g. aux devices being enabled in the same dialog) when the dialog
was opened with just a few audio sources being present. Unfortunately,
the "restart required" warning is pushed all the way to the bottom
even if the source list is empty
2015-05-22 00:24:48 +02:00
Palana 190eef07a6 UI: Handle empty key combos from QEvents in hotkey dialog
This should allow entering alt + numpad N (N > 0) on windows since there
doesn't seem to be a way to completely ignore input events generated
from "alt codes"
2015-05-15 17:08:25 +02:00
Palana 9b07309147 UI: Pre-select "General" entry when launching settings
This is just for visuals, no functionality change
2015-05-13 22:48:38 +02:00
jp9000 aafd114e67 Add latest translations from Crowdin 2015-05-12 15:29:43 -07:00
John Bradley d6085ac05c UI: Set minimum width of add/remove hotkey buttons
This prevents odd behavior with Qt5.4 turning the rounded buttons
into square push buttons.
2015-05-12 22:40:57 +02:00
Palana f6234ec90d UI: Fix push-to-* localization strings being swapped 2015-05-12 21:36:46 +02:00
Palana 37069d372f UI: Add Start/Stop Recording/Streaming hotkeys 2015-05-11 20:45:28 +02:00
Palana 6192b34ab3 UI: Add OBSBasic::StartStreaming/StopStreaming 2015-05-11 20:45:28 +02:00
Palana 508f04d927 UI: Add OBSBasic::StartRecording/StopRecording 2015-05-11 20:45:28 +02:00
Palana 054f00ced1 UI: Add SelectScene hotkey
UI supplied per scene hotkey to allow switching between scenes; this
has to be done in the UI since it's up to the application to define
what exactly "changing/selecting a scene" means (changing the output
of channel 0 may not be enough for other applications)
2015-05-11 20:45:28 +02:00
Palana c23c071ba2 UI: Add Push-to-talk/mute settings to audio settings 2015-05-11 20:45:27 +02:00
Palana d28e80ae39 UI: Add hotkeys page in settings dialog 2015-05-11 20:45:27 +02:00
Palana 369d95dfc3 UI: Add OBSSourceLabel 2015-05-11 20:45:27 +02:00
Palana b33be9fca6 UI: Add OBSHotkey{Edit,Label,Widget}
OBSHotkeyEdit is similar to QKeySequenceEdit, except less terribad on OSX, while
OBSHotkeyWidget provides a container that automagically encapsulates multiple
bindings per hotkey

OBSHotkeyLabel in combination with OBSHotkeyWidget provides mechanisms for
dealing with hotkey pairs (see upcoming usage in window-basic-settings.cpp)
2015-05-11 20:45:27 +02:00
Palana 9cda23f4b9 UI: Add basic hotkey integration 2015-05-11 20:45:26 +02:00
Palana c1a00817bb UI: Add TranslateQtKeyboardEventModifiers 2015-05-11 20:45:26 +02:00
Palana 9f0696c1d8 UI: Preserve service hotkey data 2015-05-11 20:45:26 +02:00
Palana 1d39c3e9b6 (API Change) libobs: Add hotkey data to *_create functions 2015-05-11 20:45:25 +02:00
jp9000 83df87c552 UI: Show remaining reconnect timeout duration
When a reconnect is occurring, the user doesn't really know that the
program is waiting to reconnect to the server or not, nor does the user
know how many seconds are remaining until that next attempt.  This will
show the reconnect timeout countdown as it's occurring.
2015-05-10 18:26:09 -07:00
Palana 7dd6b1d99a UI: Fix dark theme QToolTip colors on windows
QToolTip's (background) color(s) would not apply on windows, work-around
taken from https://forum.qt.io/topic/24023/
2015-05-10 07:03:38 +02:00
Jim 8fb2929420 Merge pull request #427 from dodgepong/latest-crowdin-translations
Fix issues with German translation
2015-05-08 17:14:29 -07:00
Palana 7900f46e77 UI: Use emplace_back instead of push_back + move
Found by clang-3.7 (trunk 236075) via -Wpessimizing-move
2015-05-09 01:13:56 +02:00
Palana 851d13e910 UI: Add override specifier
Found by clang-3.6 via -Winconsistent-missing-override
2015-05-09 01:13:45 +02:00
dodgepong 9d6482a3b1 Fix issues with German translation 2015-05-08 17:36:26 -04:00
dodgepong d0fbe3b382 Add latest translations from CrowdIn 2015-05-08 17:10:39 -04:00
Palana ec1043515b UI: Move Recording button label update logic 2015-05-07 02:08:09 +02:00
Palana f1f1ca45df UI: Selectively disable focus frame
NoFocusFrameStyle was meant to disable focus frames around the scenes/sources
list (on OSX); unfortunately it also removed focus frames from controls that
should have focus frames like input boxes in the settings window
2015-05-07 02:08:09 +02:00
Palana 9ddbb1077a UI: Sanitize muted handling in VolControl 2015-05-07 02:08:09 +02:00
Palana 71abed387f (API Change) libobs: Make obs_service refcounted 2015-05-07 02:08:05 +02:00
Palana ba0b8eb0e1 (API Change) libobs: Make obs_encoder refcounted 2015-05-07 02:07:56 +02:00
Palana f094bf199d (API Change) libobs: Make obs_output refcounted 2015-05-07 02:06:40 +02:00
Jim ee284a56ac Merge pull request #424 from fryshorts/bsd-build-fixes
BSD build fixes
2015-05-05 04:46:16 -07:00
Kris Moore 29c7113dd7 UI: Add FreeBSD as a platform for version string
Add an additional ifdef to correctly identify FreeBSD as platform when
generating the version string.
2015-05-04 22:37:03 +02:00
GoaLitiuM 2c3510f0a7 UI: Define snprintf only for Visual Studios prior VS2015
This change is purely cosmetic one. _snprintf is still defined in 2015,
but Microsoft may change this in the future.
2015-05-04 19:33:55 +03:00
jp9000 65ccb2178e UI: Fix vis. item widget appearance on linux
On linux, the highlighted text color should always be considered
"active"
2015-05-01 03:55:21 -07:00
kc5nra a090ed5795 UI: Block signals while populating formats
Avoid unnecessarily triggering signals while populating
the ffmpeg formats combo box.
2015-04-26 22:34:55 -05:00
jp9000 724644ef03 UI: Add warning for non-NV12 color formats
Non-NV12 video formats are primarily intended for recording.  For
streaming, if the libobs color format is not set to NV12, it's likely
that the video frames will have to be converted to NV12, which will use
extra CPU usage.  Due to that fact, it's important to warn the user of
that potential extra increased CPU usage that may be required when
streaming.
2015-04-18 00:03:22 -07:00
jp9000 881d1a79d2 UI: Add YUV 4:4:4 format option 2015-04-18 00:03:20 -07:00
jp9000 94a1dbfc5f UI: Ensure NV12/I420 format for streaming encoder
Due to the fact that flash cannot decode formats such as YUV 4:4:4, do
not allow the streaming encoders to use formats other than NV12/I420.
2015-04-18 00:03:20 -07:00
jp9000 95d96f043b UI: Enable video output format advanced option
This allows using NV12, I420, or RGB output video formats.  This option
will set what obs itself outputs frames as.

It's important to note that this is only ideal for specific FFmpeg
encoders that support the desired video format; for example, if you use
RGB and use the huffyuv encoder, huffyuv will now properly output in RGB
instead of YUV NV12/I420.

I420 is useful for eliminating the NV12->I420 conversion for the
AVerMedia encoders, as AVerMedia encoders only support I420 input.

A second even more important note about RGB is that if the encoder does
not support the format you are using, it will be converted on the CPU to
a format that the encoder supports as it's encoded; so for example
setting the obs output format to RGB and then using x264 will be futile
and end up using needless amounts of extra CPU than if you just had obs
set to NV12, which is the most common and ideal format for x264.

In the future, native output of other YUV formats might be implemented
(such as YUV 4:2:2).
2015-04-15 18:43:44 -07:00
jp9000 abdc2b61ce UI: Make RGB output use RGB, not BGR
Noticed that the red and blue channels were inverted when testing.
2015-04-15 18:42:06 -07:00
jp9000 661acfe043 UI: Add right-click context menu to projector
For now, just has the option to close the projector window.
2015-04-13 15:13:44 -07:00
HomeWorld 8ce623165a UI: Change Volume Control volume slider behavior
Replaced default volume slider style with SliderAbsoluteSetStyle.
2015-04-11 07:13:42 -07:00
HomeWorld df893dde81 UI: Add SliderAbsoluteSetStyle class
When this class is used in conjunction with a QSlider control, allows
direct setting of the slider handle position when clicking in an area
other than the slider handle.  The default QSlider handle behavior is to
step towards clicked position.
2015-04-11 07:13:30 -07:00
jp9000 0fbf112491 UI: Fix vec2 warning
Fix warning encountered on clang-504.0.40 on OSX 10.9:

obs/window-basic-main.cpp:2884:22: warning: suggest braces around
initialization of subobject [-Wmissing-braces]
		struct vec2 dir = {0.0f, 0.0f};
2015-04-10 10:07:56 -07:00
jp9000 2054161717 UI: Add windows exe icon
Adds an icon to the executable file so the executable no longer shows up
without an icon.
2015-04-10 07:27:37 -07:00
jp9000 167e781b5e UI: Add fullscreen projector options
Add the ability to use a fullscreen projector for scenes, sources, and
the preview display.
2015-04-10 07:27:37 -07:00
jp9000 c68283042c UI: Add fullscreen projector class
This allows viewing a source, scene, or the main preview in a fullscreen
window.
2015-04-10 07:27:36 -07:00
jp9000 b7421aafde UI: Add up/down/left/right position shortcuts
Allows nudging of selected items in the direction pressed when the
preview window is focused.
2015-04-10 07:27:35 -07:00
jp9000 167df61d03 UI: Add context menu to preview
Includes the ability to disable the preview and general source context
menu options (add/remove/filters/properties/etc)
2015-04-10 07:27:35 -07:00
jp9000 1cfe72664a UI: Remove listbox selection if deselected
If the item currently selected in the source listbox is deselected in
the preview, then make sure to deselect it in the listbox as well.
2015-04-10 07:27:34 -07:00
jp9000 853e63765e UI: Remove redundant config settings
These are replaced by other settings in the global ini file.
2015-04-10 07:27:33 -07:00
jp9000 206ae650de UI: Rename "MainWindow" ini section
Rather than using [MainWindow] in the global ini, explicitly state
BasicWindow instead so we know it's for the basic user interface.
2015-04-10 07:27:33 -07:00
jp9000 0e4969535b UI: Allow right-clicking to select preview items
Allows selection of items by right-clicking on the preview as well
rather than just left-clicks.
2015-04-10 07:27:32 -07:00
jp9000 3816b0bff9 UI: Fix tooltips for scene move up/down buttons 2015-04-10 07:27:31 -07:00
fryshorts 9cc56f2516 UI: Fix precision in float comparison helper
Use std::abs instead of abs to avoid loss in precision and also fix
the corresponding warning from clang (3.5.0):

warning: using integer absolute value function 'abs' when argument is
of floating point type [-Wabsolute-value]

Closes jp9000/obs-studio#414
2015-04-08 01:45:12 +02:00
Palana 70b2ffeee7 UI: Fix custom buffer size for simple output
The buffer size was being saved as 'VBufsize' while all read operations
tried to read 'Bufsize'
2015-04-04 22:17:10 +02:00
John Bradley 453b505637 UI: Ensure rescale res is non-null and length > 0 2015-03-31 15:49:43 -05:00
kc5nra b218957f38 UI: Add Format, Audio and Video ComboBoxes
Adds ComboBoxes for selecting format and audio/video
codecs. The ComboBoxes also show only valid codec
combinations for a particular container format.
2015-03-30 18:16:57 -05:00
kc5nra 8743e722ae UI: Properly disable when scale disabled
Enable/Disable scale output ComboBox based on whether
the scale checkbox is selected.
2015-03-30 17:30:37 -05:00
jp9000 d42a7ce66e UI: Fix crash log handling
Using Qt to handle crash dialogs is too unstable, so better to just use
the windows API directly and display a windows message box just to be
safe.
2015-03-27 14:29:37 -07:00
jp9000 0d704cdf92 UI: Fix bug with enforced audio encoder settings
I forgot that the track index is 1-based, not 0-bsaed.
2015-03-27 13:35:43 -07:00
jp9000 3bbefc5b57 UI: Only apply service settings to stream encoder
All audio encoders are currently having the service-specific settings
applied to them, so this makes it so that it checks which track the
stream is set to and only applies it to that specific encoder.
2015-03-27 12:55:15 -07:00
dodgepong a04548070c UI: Add latest translations from CrowdIn 2015-03-25 20:51:25 -04:00
jp9000 709ad0705e UI: Don't use deferred update on cancel
If properties are set to defer updating, don't call obs_source_update on
dialog rejection.
2015-03-25 14:14:43 -07:00
jp9000 9e39a2c787 UI: Use setGeometry to restore saved dimensions
There was an issue where the position/size would keep changing every
time the program opened/closed, was due to the fact that we were not
calling setGeometry to restore the position/size.
2015-03-25 14:14:42 -07:00
jp9000 2fdd58d312 UI: Add #pragma once to double slider widget 2015-03-25 14:14:40 -07:00
jp9000 3c5cc5cd54 UI: Add visibility checkbox to main sources list
Adds a visibility checkbox to the main sources list so that users can
temporarily disable/re-enable sources.  Only applies to scene items, not
the sources themselves.
2015-03-25 14:12:02 -07:00
jp9000 86ed7f12f3 UI: Allow scenes to use filters 2015-03-25 14:12:01 -07:00
jp9000 118665ec99 UI: Add missing locale text
"Close" and "Interact"
2015-03-25 14:12:00 -07:00
jp9000 ceba24c7e9 UI: Add user interface for filters 2015-03-25 14:12:00 -07:00
jp9000 ff363bc77b UI: Add QListWidget subclass to emit focus change
The FocusList subclass of QListWidget emits a GotFocus signal when it
gets focus -- used for the filters window to know when a specific filter
list gets focus.
2015-03-25 14:11:59 -07:00
jp9000 642aa7454f UI: Add list item widget w/ visibility checkbox
This is used to allow the user to temporarily disable sources/filters.

For each item in the list box, it displays a visibility checkbox (with
eye icon) that the user can click to disable/re-enable sources or
filters.

I did not end up using the Qt::ItemIsUserCheckable flag with the list
items for a few reasons:

- We could not style the checkbox indicator without qss screwing up
  other parts of the list widget style on certain operating systems

- We could not get the icon to properly invert on active selection like
  the text does on mac/linux, which made it look strange

- Clicking the checkbox too fast would cause it to signal a double-click
  on the icon, opening the properties for a source in the source list
2015-03-25 14:11:58 -07:00
jp9000 2e053c849b UI: Add mute checkbox to volume control 2015-03-25 10:03:24 -07:00
jp9000 399eb6d330 UI: Add 'mute' checkbox style hint 2015-03-25 10:03:24 -07:00
jp9000 53a98ecbe5 UI: Add 'visibility' checkbox
This checkbox gives an 'eye' icon that indicates whether something is
visible or not.  The color of the icon is influenced by the current
style's foreground color.
2015-03-25 10:03:23 -07:00
jp9000 606d72b1fe UI: Don't include properties-view.hpp in header
Replace header include with forward to reduce needless header includes
and thus reduce compile time.
2015-03-25 10:03:22 -07:00
jp9000 bf6e83821c UI: Emit DisplayResized() viewport signal
This allows knowing when the graphics viewport itself changes in size
(in case the window with the graphics viewport does not change size)
2015-03-25 10:03:21 -07:00
Palana 724690d77e UI: Update window titles on source name change 2015-03-24 14:51:56 +01:00
jp9000 81d671f106 UI: Add int/float slider to property view 2015-03-22 19:18:15 -07:00
jp9000 17adf8f35e UI: Add floating point slider control 2015-03-22 19:18:14 -07:00
kc5nra dac3fd88e0 UI: Fix potential memory leak in properties
When hitting the Cancel button, cleanup code needs to go through the
reject() callback as well.
2015-03-22 19:18:13 -07:00
jp9000 87965fa9eb UI: Clear list boxes in ::closeEvent
Ensures that ->deleteLater events are put in to the event queue before
the destructor is called.
2015-03-22 19:18:12 -07:00
jp9000 6b3d30ef03 UI: Flush event queue before obs_shutdown
Sometimes events with rogue source references are in the event queue
when the program is shutting down.  This can cause the program to
reference freed data.  Processing those remaining events before shutting
down solves the issue.
2015-03-22 19:18:12 -07:00
jp9000 c4ef2522ad UI: Destroy save timer before closing main window
This prevents the save timer from unexpectedly going off during the
middle of the save process.
2015-03-22 19:18:11 -07:00
jp9000 7014076169 UI: Make list selection in dark theme more visible
When an item is selected but not focused, it would be too similar to the
non-selected color.
2015-03-22 19:18:10 -07:00
jp9000 363d8b890d UI: Store proper window pos/size
Only store the last restored (non-maximized and non-minimized) window
position and size on exit.
2015-03-22 19:18:09 -07:00
jp9000 dc36f6f420 UI: Implement deferred update flag (properties) 2015-03-19 15:57:19 -05:00
jp9000 db17a72ff6 UI: Fix typo in dark theme causing wrong borders
This fixes an issue where the borders for certain types of windows would
not match the intended border style/color.  It was supposed to be 1
through 6 for frameShape, but I ended up putting 5 twice.
2015-03-13 07:20:04 -07:00
jp9000 48d47e9101 UI: Fix dark theme border consistency issue
Fixes an issue where the border color/style would not be consistent
across different operating systems
2015-03-13 01:41:57 -07:00
jp9000 9832a760b8 (API Change) Always use planar float audio output
Core API functions changed:
-----------------------------
EXPORT bool obs_reset_audio(struct audio_output_info *aoi);
EXPORT bool obs_get_audio_info(struct audio_output_info *aoi);

To:
-----------------------------
EXPORT bool obs_reset_audio(const struct obs_audio_info *oai);
EXPORT bool obs_get_audio_info(struct obs_audio_info *oai);

Core structure added:
-----------------------------
struct obs_audio_info {
	uint32_t            samples_per_sec;
	enum speaker_layout speakers;
	uint64_t            buffer_ms;
};

Non-interleaved (planar) floating point output is standard with audio
filtering, so to prevent audio filters from having to worry about
different audio format implementations and for the sake consistency
between user interfaces, make it so that audio is always set to
non-interleaved floating point output.
2015-03-12 22:22:02 -07:00
Socapex 6a16778bc9 UI: Implement theme selection option
OBS will offer the user a list of themes which are .qss files inside
data/obs-studio/themes.  If no theme is found in the configuration, it
loads the default theme for the system.
2015-03-12 09:27:18 -07:00
jp9000 5262fa31c0 UI: Change "Language:" to "Language" (consistency) 2015-03-12 09:27:18 -07:00
jp9000 7bd85233cc UI: Make "output mode" label disabled if active
I had previous made the output mode list box become disabled, but
neglected to do it for the label as well.
2015-03-12 09:27:17 -07:00
jp9000 21b8e6462b UI: Give "advanced" section icon a white border
Instead of trying to replace this icon, I feel like just giving it a
white border is sufficient to make it usable in both light and dark
themes.

The only other option is to add icon changing code for themes for this
particular type of widget, and I felt it was best to not go down that
route due to the complexity involved.
2015-03-12 09:27:16 -07:00
Socapex a62f079541 UI: Add dark theme
Links up certain controls via a "themeID" property so the icons can by
dynamically changed via the qss file if needed.
2015-03-12 09:27:16 -07:00
jp9000 b03eae57c6 (API Change) Fix "apply service settings" functions
API changed from:
------------------------
EXPORT void obs_service_apply_encoder_settings(obs_service_t *service,
		obs_encoder_t *video_encoder,
		obs_encoder_t *audio_encoder);

void obs_service_info::apply_encoder_settings(void *data
			obs_encoder_t *video_encoder,
			obs_encoder_t *audio_encoder);

To:
------------------------
EXPORT void obs_service_apply_encoder_settings(obs_service_t *service,
		obs_data_t *video_encoder_settings,
		obs_data_t *audio_encoder_settings);

void obs_service_info::apply_encoder_settings(void *data
			obs_data_t *video_encoder_settings,
			obs_data_t *audio_encoder_settings);

These changes make it so that instead of an encoder potentially being
updated more than once with different settings, that these functions
will be called for the specific settings being used, and the settings
will be updated according to what's required by the service.

This fixes that design flaw and ensures that there's no case where
obs_encoder_update is called where the settings might not have
service-specific settings applied.
2015-03-07 16:32:00 -08:00
jp9000 5faa5157c5 UI: Change default retry delay to ten seconds
Two seconds is a bit low apparently, and some services don't seem to
like it.
2015-03-07 10:10:41 -08:00
Socapex baa1890ed6 UI: Save position and size of main window
Resolves bug tracker issue #0000143

Closes Pull Request #396
2015-03-06 08:54:31 -08:00
jp9000 f4704cf4a8 UI: Use 'reorder' signal for scene item reordering
The old signals for for reordering have been removed; the new signal to
use is the 'reorder' signal, which means that the list needs to be
refreshed.
2015-03-05 02:28:17 -08:00
jp9000 b515f08048 UI: Fix potential race condition
The update_properties signal is created before the view itself is
created, therefore it was possible for the callback to trigger when the
view was invalid.
2015-03-04 04:34:06 -08:00
jp9000 7c8b053703 UI: Indicate source is being shown in properties
When viewing the properties of a source, there's no way to specify that
a source is actually being shown or not to the core.  This uses the new
obs_source_inc_showing and obs_source_dec_showing to tell the source
that it's being shown/hidden in this part of the program without
necessarily having to use a new render view just to render it.
2015-03-02 12:23:25 -08:00
HomeWorld 1a7e594bdb UI: Optimize OBSBasic.ui
This optimizes the main OBSBasic.ui window so that it uses fewer objects
and thus fewer allocations.  Closes pull request #386

(message added by Jim)
2015-03-01 19:06:16 -08:00
Caleb Anderson c3e382c8f7 UI: View Log menu entry in Help -> Log Files menu
Since the file being logged to changes with each run, opening a log
file is a tad more involved than desirable when it's necessary to view
the log each time OBS is run. This new menu entry shortcuts opening the
file from the file system manually.
2015-02-24 01:44:37 -07:00
fryshorts fd53892a4d UI: Fix rounding issues for advanced audio
Remove the close_float check for values that are set through the
advanced UI. If the difference of the integer was 1 this would sometimes
cause the input to be ignored.
Add rounding to values that are set through the signal system, since
casting alone will act like floor, which is not desirable in this case.
2015-02-17 21:44:32 +01:00
HomeWorld 641f626593 UI: Display message if no properties available
Display "No properties available" text in the property view if there are
no properties available.

Closes Pull Request #377
2015-02-16 18:39:39 -08:00
jp9000 2cc4c6e8d3 UI: Prevent re-updating of the stream encoder
Using advanced output mode, the stream encoder could be updated with the
same settings, causing the encoder to output those changes
unnecessarily.
2015-02-15 22:08:55 -08:00
jp9000 77f2fda3ce UI: Fix adv. mode recording settings update bug
The recording settings are updated only when not using the streaming
encoder for recording.
2015-02-15 22:08:55 -08:00
Socapex 86d4ee68e6 UI: Do not save the project if null
If the jsonData string is null, then there's nothing that should be
written.

Closes pull request #366 from Socapex/debugcrash
2015-02-14 12:19:41 -08:00
fryshorts 90ccae6f4c UI: Ensure only one advanced audio settings window
Add a check to prevent that the advanced audio settings dialog is only
once. When the dialog is already present raise it to the top instead.
2015-02-13 13:11:15 +01:00
fryshorts c45e74039f UI: Fix crash in advanced audio settings
Delete source controls when the settings window is deleted.
2015-02-13 13:11:15 +01:00
dodgepong 2b01030607 Add latest translations from crowdin 2015-02-11 19:15:08 -05:00
dodgepong 187f5181c7 Add latest translations from crowdin 2015-02-11 16:27:24 -05:00
jp9000 20d1c2c410 UI: Add 'Advanced' settings section
Currently, this allows the setting of values such as:
- Audio buffering time
- Color format (still somewhat unsupported)
- YUV color space (if a YUV format)
= YUV color range (if a YUV format)

More color formats will be added in the future, such as RGB and YUV
4:2:2 formats.
2015-02-11 13:10:57 -08:00
jp9000 bd2110947a UI: Disable unused export/import menu options 2015-02-11 13:10:56 -08:00
jp9000 bda7cfc3ed UI: Remove unused variable 2015-02-11 08:06:37 -08:00
jp9000 dce0afa84f UI: Use grid layout for advanced audio properties
This fixes the issue where the labels wouldn't have enough space for
localization text in certain circumstances, and also fixes some issues
with alignment
2015-02-11 08:02:56 -08:00
jp9000 1fc132dc77 UI: Add 'Save' and 'Discard' to localization text 2015-02-11 05:47:05 -08:00
jp9000 c2832b8b1c UI: Add "enforce streaming service settings"
Add a checkbox named "Enforce streaming service encoder settings"
checkbox to advanced output.  Disabling this checkbox allows the user to
optionally disable the enforcement of streaming service encoder
settings.  I had a user complain that they didn't want to always have
the service's preferred encoder settings forced on them.
2015-02-10 22:10:40 -08:00
jp9000 fc574a0d7b UI: Fix custom encoder settings not applying
Somehow the code to hook this particular widget was deleted, so add it
back in.
2015-02-10 22:10:39 -08:00
jp9000 943f89b873 UI: Apply service encoder settings (simple output)
Ensures that the current service's encoder settings are applied to the
encoders used with the simple output.  This is always on for simple
output so users don't have to mess with it themselves.
2015-02-10 22:10:39 -08:00
jp9000 3ca57fbb3e UI: Set simple mode reconnect signal to toggled()
clicked() is the wrong signal to use, it only activates on actual user
click, not when the value is changed.  toggle() activates whenever the
value itself is changed.
2015-02-10 22:10:38 -08:00
jp9000 368f04727c UI: Set simple output mode bufsize minimum to 0 2015-02-10 22:10:07 -08:00
dodgepong eb918d01b4 Add latest translations from CrowdIn 2015-02-09 19:26:17 -05:00
jp9000 0c1d121ff2 Remove various unused variables
Unused variables detected by mingw
2015-02-09 03:49:13 -08:00
martell c0827212df UI: use _WIN32 instead of WIN32
_WIN32 is a compiler define so it should be used.  WIN32 is only valid
when it's defined in a header.
2015-02-09 03:41:58 -08:00
jp9000 21ec81ebcc UI: Do not allow invalid downscale/rescale values
For the 'output resolution' setting in video settings, do not show
values in the list that it does not support (width must be aligned to a
128bit boundry, and height must be divisible by two)

For the 'rescale' settings in advanced outputs, the scales must all be
divisible by two.
2015-02-08 01:31:02 -08:00
jp9000 c69e7c96f3 UI: Base encoder rescales on output resolution
The 'rescale' values in advanced output section are supposed to be based
upon the output resolution of the program.  Meaning they should not be
used for scaling up, because the resolution downloaded from the graphics
processor is the output resolution set in video settings; thus any
resolution you set for the 'rescale' values is scaled from that.
2015-02-08 01:29:15 -08:00
jp9000 bd78db91e9 UI: Fix encoder rescaling for streaming
The "rescale" option for streaming in the advanced output settings was
not properly checking the parameter output of sscanf.  sscanf returns
the number of values that were found, not the number of string matches.
2015-02-08 01:11:34 -08:00
jp9000 bbd48c7bf2 UI: Isolate filter localization strings
To prevent from causing confusion/issues for our most awesome and
respected locale editors, only localize and translate the relevant text
rather than the extensions of the filter.
2015-02-07 12:12:12 -08:00
jp9000 b72e68afe7 (API Change) Fix obs_service_gettype func name
Before:                After:
obs_service_gettype    obs_service_get_type

It seems there was an API function that was missed when we were doing
our big API consistency update.  Unsquishes obs_service_gettype to
obs_service_get_type.
2015-02-07 08:19:34 -08:00
jp9000 69c6714090 UI: Make service settings use OK/Apply/Cancel
Currently service settings are updated in real time via the properties
view, which means that OK/Cancel/Apply have no effect.  This fixes that
by using the new type of properties view that operates only on settings
data, not an object.
2015-02-07 08:11:46 -08:00
jp9000 17c342bf61 UI: If active, prompt user before exiting
Precautionary measure to prevent the user from accidentally clicking the
'exit' buttons
2015-02-07 03:39:16 -08:00
jp9000 a3e47e53bf UI: Add button for adv. audio properties
Add a button to the main window to access advanced audio properties to
make it a bit more visible to users.

To facilitate this, the bottom part of the window was switched to a grid
layout.
2015-02-07 02:43:37 -08:00
jp9000 8ee3e41d09 UI: Remove unnecessary info from locale string
All outputs specify streaming/recording, there's no reason to say this
explicitly it just causes confusion about the advanced output.
2015-02-06 13:47:04 -08:00
jp9000 8b2614ddc2 UI: Add advanced output settings
Adds an 'advanced' mode to the output settings to allow more powerful
and complex streaming and recording options:

- Optionally use a different encoder for recording than for streaming to
  allow the recording to use a different encoder or encoder settings if
  desired (though at the cost if increased CPU usage depending on the
  encoders being used)

- Use encoders other than x264

- Rescale the recording or streaming encoders in case the user wishes to
  stream and record at different resolutions

- Select the specific mixer to use for recording and for streaming,
  allowing the stream and recording to use separate mixers (to for
  example allow a user to stream the game/mic audio but only record the
  game audio)

- Use FFmpeg output for the recording button instead of only recording
  h264/aac to FLV, allowing the user to output to various different
  types of file formats or remote URLs, as well as allowing the user to
  select and use different encoders and encoder settings that are
  available in the FFmpeg library

- Optionally allow the use of multiple audio tracks in a single output
  if the file formats or stream services support it
2015-02-06 11:55:48 -08:00
jp9000 a2373b1258 UI: Add buffer size to 'simple' settings 2015-02-06 03:56:19 -08:00
jp9000 07007bcc6e UI: Refactor output handling
To accommodate multiple types of outputs, there has to be some level of
abstraction.  The BasicOutputHandler structure will give us a way that
we can switch between different output configurations.
2015-02-06 03:17:33 -08:00
jp9000 efe31c9fe9 UI: Keep prop. view scroll positions if modified
If the properties view is scrolled down or right and a widget triggers
it to repaint, it would reset its scroll position, making editing a bit
awkward.  This simply saved/restores the position before and after
rebuilding the properties view.
2015-02-06 00:01:21 -08:00
jp9000 4983aaa586 UI: Clarify encoder preset usage
For the simple output section, clarifying that higher == less CPU is
pretty important.
2015-02-04 16:52:04 -08:00
jp9000 ac1651c7d3 UI: Add OBSPropertiesView::GetSettings
Allows the ability to get the current settings of a properties view
2015-02-04 16:52:03 -08:00
jp9000 cb70a531b7 UI: Add 'Changed' signal to properties view 2015-02-04 16:52:03 -08:00
jp9000 baaa061344 UI: Allow prop. view to be created via identifier
Allows a properties view control to be created only with an identifier
string instead of only being created with a pointer to an object.  This
way, we don't necessarily have to have an object for some arbitrary
settings we want the user to be able to modify.
2015-02-04 16:52:02 -08:00
jp9000 88d3c506ae UI: Use class member initialization for prop. view
Instead of setting every variable in the initializer list, use class
member initialization by default
2015-02-04 16:52:02 -08:00
jp9000 3423d2f505 UI: Use class member initializers for settings UI
Instead of using constructor initializer list, use class member
initialization
2015-02-04 16:51:59 -08:00
jp9000 fcb8561d6c UI: Rename 'x264 Preset' to 'Encoder Preset'
In the future, encoders other than x264 may end up filling this preset
list with their own values.
2015-02-04 16:51:54 -08:00
jp9000 8ffd7ec16c UI: Rename 'Custom x264 Settings'
Rename 'Custom x264 Settings' to 'Custom Encoder Settings', because it
may be useful to use this for encoders other than x264
2015-02-04 16:51:53 -08:00
jp9000 93ec22ff54 UI: Implement source mixer modification signals
Implement the signals for the mixer checkboxes in the advanced audio
control so that it properly relays the values to/from the source when
the mixers are changed in obs or when the mixers are changed by the
user.
2015-02-04 16:51:52 -08:00
jp9000 73d538102b UI: Set checkbox value without signaling
Instead of comparing the value of the checkbox to prevent recursive
signaling, just disable its ability to signal.
2015-02-04 16:51:52 -08:00
jp9000 82ca17ab66 UI: Rename 'Media Channel' to 'Tracks'
In the advanced audio properties, the last set of controls designate
what tracks the audio of a specific source is applied to, but for some
reason I named it 'Media Channels'.  It feels a bit confusing of a name.
I feel like it should really just be called 'Tracks' here for lack of a
better term.
2015-02-04 16:51:51 -08:00
jp9000 84e1f47ced (API Change) Add support for multiple audio mixers
API changed:
--------------------------

void obs_output_set_audio_encoder(
		obs_output_t *output,
		obs_encoder_t *encoder);

obs_encoder_t *obs_output_get_audio_encoder(
		const obs_output_t *output);

obs_encoder_t *obs_audio_encoder_create(
		const char *id,
		const char *name,
		obs_data_t *settings);

Changed to:
--------------------------

/* 'idx' specifies the track index of the output */
void obs_output_set_audio_encoder(
		obs_output_t *output,
		obs_encoder_t *encoder,
		size_t idx);

/* 'idx' specifies the track index of the output */
obs_encoder_t *obs_output_get_audio_encoder(
		const obs_output_t *output,
		size_t idx);

/* 'mixer_idx' specifies the mixer index to capture audio from */
obs_encoder_t *obs_audio_encoder_create(
		const char *id,
		const char *name,
		obs_data_t *settings,
		size_t mixer_idx);

Overview
--------------------------
This feature allows multiple audio mixers to be used at a time.  This
capability was able to be added with surprisingly very little extra
overhead.  Audio will not be mixed unless it's assigned to a specific
mixer, and mixers will not mix unless they have an active mix
connection.

Mostly this will be useful for being able to separate out specific audio
for recording versus streaming, but will also be useful for certain
streaming services that support multiple audio streams via RTMP.

I didn't want to use a variable amount of mixers due to the desire to
reduce heap allocations, so currently I set the limit to 4 simultaneous
mixers; this number can be increased later if needed, but honestly I
feel like it's just the right number to use.

Sources:

Sources can now specify which audio mixers their audio is mixed to; this
can be a single mixer or multiple mixers at a time.  The
obs_source_set_audio_mixers function sets the audio mixer which an audio
source applies to.  For example, 0xF would mean that the source applies
to all four mixers.

Audio Encoders:

Audio encoders now must specify which specific audio mixer they use when
they encode audio data.

Outputs:

Outputs that use encoders can now support multiple audio tracks at once
if they have the OBS_OUTPUT_MULTI_TRACK capability flag set.  This is
mostly only useful for certain types of RTMP transmissions, though may
be useful for file formats that support multiple audio tracks as well
later on.
2015-02-04 16:51:29 -08:00
HomeWorld 0fea987ed4 UI: Apply a style sheet using path
This allows the usage of other resources in the style sheet, like
icons/etc, relative to the style sheet location.  For example, to change
the main window app icon, add #OBSBasic { qproperty-windowIcon:
url("basic/newicon.png") } in the style sheet, where "basic/newicon.png"
is a path relative to the qss file location.
2015-01-26 11:48:32 -08:00
jp9000 4093ce4d84 UI: Fix bug when canceling first source properties
When you launch the source properties for the first time, the settings
for the source are empty and default values are used.  With the new
OK/Cancel buttons that were recently merged, it first saves the old
settings, then if the user cancels applies those old settings.

However, because the first settings are always empty, obs_source_update
will try to apply the old settings (which are empty) to the modified
settings, but it can't reset to those settings because it's technically
not applying any settings at all.

In other words, when you create the source and modified the properties
for your first time, pressing cancel would not reset anything at all.

This fixes that issue by clearing the current settings with
obs_data_clear before updating the source with the old settings, which
ensures that any settings that were empty are reset to an empty status.
2015-01-24 22:10:37 -08:00
HomeWorld 5b641d87fb UI: Fix missing widget parent from constructor
The styling isn't applied if the widget doesn't have a parent
2015-01-16 11:21:11 +02:00
Blackhive 9b3c204707 UI: Enable load of stylesheet.qss from config dir
This will allow obs to load stylesheet.qss (Qt stylesheet). It enables
users to theme obs how they please within Qt stylesheet guidelines. A
default stylesheet is not yet available.
2015-01-16 00:28:25 -08:00
jp9000 14488a8c2f UI: Fix constructor reorder warning
The class members were listed in the wrong order, causing GCC to throw
up a reorder warning signifying that they cannot be initialized in the
order they were listed in the constructor initializer list.
2015-01-16 00:05:09 -08:00
jp9000 82320a9ca7 (API Change) Make os_get_config_path safer to use
Changed:
  char *os_get_config_path(const char *name);

To:
  int os_get_config_path(char *dst, size_t size, const char *name);

Also added:
  char *os_get_config_path_ptr(const char *name);

I don't like this function returning an allocation by default.
Similarly to what was done with the wide character conversion functions,
this function now operates on an array argument, and if you really want
to just get a pointer for convenience, you use the *_ptr version of the
function that clearly indicates that it's returning an allocation.
2015-01-15 23:44:38 -08:00
Jim 2fec0f82c2 Merge pull request #337 from Blackhive/volume_meter
obs: Allow styling of volume meters
2015-01-15 22:15:18 -08:00
Jim bffd75cba4 Merge pull request #338 from Blackhive/layout_update
UI: Fix minor stylesheet issues
2015-01-15 22:10:31 -08:00
Weikardzaena 2152b40e68 UI: Add Okay/Cancel Buttons to Properties Dialog
Use QDialogButtonBox to add "Okay" and "Cancel" buttons to the
properties dialog. The core functionality of the dialog is not changed;
I.E. the settings are still applied to the source as the user changes
them. If the user clicks "Okay", the dialog simply exits. If the user
clicks "Cancel", the original settings are reapplied to the source then
the dialog exits. If the window is closed by any other means (I.E. by
the main obs window closing) then the properties dialog prompts the user
if they changed anything and asks if they wish to save their settings.

In order to implement this last feature, a method of checking for open
dialogs and sending each a quit message is added to the closeEvent()
method for OBSBasic.
2015-01-15 21:49:03 -08:00
Blackhive e198e27997 UI: Fix minor stylesheet issues
This does a few small things
-Moves buttons down 20px to the same height as the list boxes
-Adds a QFrame around scrollArea for mixer list.

Q: Why was this done?
A: When you go to style the mixer list in regards to adding a border,
shadow, or glow, it needs to be done on the QFrame. If you do it on the
scrollArea itself, the scrollbars will overlap the bottom of the border,
causing the border to look cut-off. Additionally, the other two sources
and scenes list widgets already had frames, so they did not have this
problem.
2015-01-14 02:15:30 -05:00
Blackhive 988c0db1f6 obs: Allow styling of volume meters
This will allow styling of the volume meters so that users are not stuck
with the default colors when they style a theme. Volume meters' colors can
be changed in stylesheet.qss using the following format as an example:

VolumeMeter {
qproperty-bkColor: #DDDDDD;
qproperty-magColor: #207D17;
qproperty-peakColor: #3EF12B;
qproperty-peakHoldColor: #000000;
}
2015-01-14 02:01:20 -05:00
Carl Fürstenberg 6095e7ef51 Add SOVERSION to libobs-opengl
Because libobs-opengl is a public library, it's customary to have SONAME
embedded in the library file.  Also remove the prefix override and
remove the prefixing "lib" from the output name.  This also requires us
to pass the library file name to dlopen invocations.
2015-01-13 17:51:38 -08:00
jp9000 f58ca29484 UI: Use config file for color format/space/range
Allows the color format, color space, and color range to be set by the
user.  This will need user interface for in the future, though it'll
have to be an advanced setting that's hidden from the user by default
because I don't feel comfortable exposing this to a typical user.
2015-01-10 18:35:58 -08:00
HomeWorld d9ec2128f2 UI: Removed an unnecesary setSizeConstraint call
This setSizeConstraint(QLayout::SetMaximumSize) call
caused the widgets to be improperly sized.
For example: combo boxes with long texts ('big' widget width) not
being completly visible.
2015-01-05 15:41:25 +02:00
HomeWorld db3b666df5 UI: Fix properties window size grip position on resize
To have its position updated, QDialog::resizeEvent must
be called.
2015-01-05 14:23:12 +02:00
HomeWorld 24776b7f65 UI: Use SourceListWidget for sources list 2015-01-05 03:39:01 -08:00
HomeWorld 88333b0f47 UI: Add SourceListWidget - QListWidget subclass
The default behavior of QListWidget is to allow double clicks of any
mouse button, but in certain situations/usage cases this can cause
undesirable results.  As an example: when double-clicking with the right
mouse button on an item in the sources list box, it will open up both
the properties window and the context menu.  Not pretty at all.

This subclass filters out double clicks for any mouse button other than
the left mouse button to fix this issue.
2015-01-05 03:38:18 -08:00
jp9000 e9f8374bf4 UI: Load debug privileges for program
Debug privileges help prevent issues with things like game capture
2015-01-05 02:45:41 -08:00
jp9000 e8002dc9ed UI: Save at regular intervals
Save the file when "start recording" or "start streaming" is clicked,
and also save at every 20 second interval
2015-01-05 02:45:40 -08:00