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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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;
}
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.
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.
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.
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.
When a source has a lot of properties, the scroll area containing them
would try to expand to fit them all, often leaving the preview area
super squished. So this just sets a maximum height for the properties
scroll area.
There appears to be a bug with displaying the vertical scroll bar widget
where the horizontal scroll bar will show when it's not supposed to.
Fortunately it can be completely disabled.
The regular scroll area can expand horizontally, but the problem with
this is that sometimes there are controls within it that expand way too
big.
For example, the properties window for window capture can have a list of
windows where the titles of the windows are really really long, and it
causes the properties to extend way too far to the right, making the
window look really unusual.
Another example are the volume controls in the main window that can
expand way to the right if the name of a source is really long, causing
the volume control to stretch way too far to the right, making the
volume controls difficult to use when that happens.
So this just makes it so it sets the maximum width of a scroll area's
internal widget to the actual width of the scroll area, preventing it
from going off the side of the scroll area.
This crash report dialog is mostly just for the windows crash handling
code. If a crash occurs, the user will be able to view the crash report
and post it on the forums or give it to a developer for debugging
purposes.
Suppress signals of the volume input when setting a value. This stops
the volume control from setting the source volume when it receives the
volume changed event from the source.
Suppress signals of the volume slider when setting a value. This stops
the volume control from setting the source volume when it receives the
volume changed event from the source.
Use a dedicated method for setting the dB label in the volume control
and make sure to call it regardless if the volume was changed through
the slider or from somewhere else.
This dialog gives options such as increasing audio past 100%, forcing
the audio of a source to mono, and setting the audio sync offset of a
source (which was an oft-requested feature)
Refactor the screen enumeration code a little to make sure xinerama is present
and active before using it. If the extension is present but not active it will
no longer fail.
Remove the update time check from the volume meter since it is no longer
nescessary. The update interval can now be set with the volmeter which has
the added benefit of not loosing data where previously updates had been
skipped.
This was an important change because we were originally using an
hard-coded 709/partial range color matrix for the output, which was
causing problems for people wanting to use different formats or color
spaces. This will now automatically generate the color matrix depending
on the format, color space, and range, or use an identity matrix if the
video format is RGB instead of YUV.
This replaces the old code for the audio meter that was using
calculations in two different places with the new audio meter api.
The source signal will now emit simple levels instead of dB values,
in order to avoid dB conversion and calculation in the source.
The GUI on the other hand now expects simple position values from
the volume meter api with no knowledge about dB calculus either.
That way all code that handles those conversions is in one place,
with the option to easily add new mappings that can be used
everywhere.
This replaces the code for volume control with a newer version that
uses the new fader implementation in order to control the fader/slider
position and source volume.
The volume label will now indicate the gain in dB instead of percent,
mainly because it looks cool and is easy to do.
Due to libobs saving the multiplier option for the source instead of
the slider/fader positon, existing volume levels will (mostly) stay
the same with only the slider beeing at a different position.
This is of course within the resolution of the slider (100 steps).