When initializing with a default scene, save the data to ensure a file
is actually present when needed (such as for scene collections which may
need the file)
Add a central function for clearing all data: scenes, sources, widgets
such as lists that may contain source references in their sub-items,
dialogs which may contain source references. In certain circumstances
this data must be fully released and manually freed to ensure that there
are no outstanding references to obs data (such as on shutdown, where
all data should be properly freed).
These functions are designed to manually delete item widgets within
other widgets to prevent ->deleteLater from being called on them. This
prevents the item widgets from being stuck in the event queue, and
prevents references to things like sources from being stuck in the event
queue along with them if they're used in the item widget's class or
functions.
Right now, information about global audio sources is stored in both
scene files and in the config. These must be separated; there's no need
to store them in both when they can just be stored in the scenes file.
When using e.g. a color correction filter on any source and changing
any value (with slider enabled, e.g. contrast) to -0.10 the value would
get cycle between -0.07/-0.08 at some point when using the up arrow; it
would also get stuck on -0.69.
For the other direction, when starting from e.g. -0.02 the value would
jump from 0.05 to -0.08 when pressing the down arrow.
Problem was reported at https://obsproject.com/forum/threads/32450
The empty implementation for the QDataStream operators is necessary to fix
a Qt assertion: "QVariant::save: unable to save type
'std::vector<std::shared_ptr<OBSSignal> >' (type id: 1036)."
It doesn't seem like a full implementation of the stream operators would be
useful since the signal registration is very specific to the interaction
between the scenes and sources list, i.e. in case the scenes list ever accepts
scenes from sources (not 'obs_source's) other than itself (non InternalMove
drag&drop?) it would have to register those scenes with the libobs core which
should trigger the normal signal registration
Use the config button on volume controls to allow the ability for
filters/properties to be accessed via the mixer. Particularly useful
for the purpose of accessing filters/properties of global audio outputs
that are added via audio settings.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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"
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)
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)
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.
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
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.
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).
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.
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};
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]
Closesjp9000/obs-studio#414
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.
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.
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.
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.
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
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.
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.
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.
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.
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.