Commit Graph

508 Commits (93ec22ff54f1854643b03d22d158dbd6de3b1c6e)

Author SHA1 Message Date
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
jp9000 0332cdce1c UI: Remove some trailing whitespace 2015-01-05 02:45:39 -08:00
jp9000 ebc2d4ab11 UI: Implement SaveProject function 2015-01-05 02:45:39 -08:00
jp9000 290975e3a0 UI: Set a maximum height to properties scroll area
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.
2015-01-05 02:10:34 -08:00
jp9000 82b36ca41e UI: Allow buttons to refresh properties view
I forgot to check the return value from the button to see if the button
wanted the UI to be refreshed or not.
2015-01-05 02:10:07 -08:00
jp9000 ef6064b9b5 UI: Always hide VScrollArea horizontal scroll bar
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.
2015-01-03 07:32:04 -08:00
jp9000 b2b76559f3 UI: Fix property scroll area widget not resizing
If QScrollArea::resizeEvent is not called, then the internal widget does
not get automatically resized when it's set to automatically be resized.
2015-01-03 07:31:51 -08:00
jp9000 0a481d5bcc UI: Use VScrollArea for properties view 2015-01-03 03:03:04 -08:00
jp9000 4993f2fa22 UI: Use VScrollArea for volume control area 2015-01-03 03:02:23 -08:00
jp9000 2c796e4b7b UI: Add vertical scroll area subclass
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.
2015-01-03 02:42:57 -08:00
jp9000 824c7b02c9 UI: Add crash report dialog
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.
2015-01-03 02:37:21 -08:00
fryshorts 10a0b08ec9 obs: Fix signal in advanced volume controls
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.
2015-01-02 20:11:40 +01:00
fryshorts 89792865a1 obs: Fix signal in volume control
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.
2015-01-02 20:11:28 +01:00
fryshorts 0f8b2faed4 obs: Fix label in volume control
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.
2015-01-02 19:31:09 +01:00
jp9000 6fc52dfb16 UI: Add advanced audio properties dialog
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)
2014-12-28 01:51:56 -08:00
fryshorts ca8ac4e809 obs: Refactor network requests.
Remove unneeded class members for request and buffer handling.
Let Qt do all the hard work here, keeping track of requests and
associated data.
2014-12-25 14:53:09 +01:00
Jim d710726e6e Merge pull request #313 from fryshorts/xinerama-fix
UI: Fix bug with xinerama on linux
2014-12-22 15:48:13 -08:00
fryshorts 20863c5ed3 UI: Fix bug with xinerama on linux
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.
2014-12-22 01:12:58 +01:00
Jim 9f3ab85d2b Merge pull request #311 from fryshorts/audio-analyzer-move
libobs: Move audio level calculations
2014-12-21 11:56:02 -08:00
jp9000 1d9440c6a7 Basic UI: Raise bitrate limit to 1000000
I don't know why on earth I set the limit to 16000.  There's no reason
why there should really be a low hard limit.
2014-12-21 10:14:20 -08:00
Jake Probst cc2d3b2d1c linux x11: get monitors: use xcb and add fallback if xinerama not found 2014-12-19 21:51:37 -08:00
jp9000 793d7b51b2 UI: Fix locale typo 2014-12-15 03:00:55 -08:00
jp9000 640967b997 UI: Add video scale filters to basic settings 2014-12-15 01:55:19 -08:00
fryshorts 43552478fc obs: Remove update time from volume meter
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.
2014-12-14 18:39:54 +01:00
jp9000 b07862286a (API Change) Add colorspace info to obs_video_info
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.
2014-12-11 19:51:30 -08:00
fryshorts 014a333807 obs/libobs: Use new volume meter api
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.
2014-12-04 21:58:35 +01:00
fryshorts 3fea6997a7 obs: Use new fader from libobs for volume control
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).
2014-11-26 20:07:26 +01:00
Palana afa172feea sparkle-updater: Enable delta update failure fallback
Refer to 53cad36953
for further details
2014-11-01 03:06:26 +01:00