Commit Graph

2006 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
jp9000 e4fdd61c74 libobs: Clarify comment on obs_source_set_flags
The comment says "these are different", but doesn't state why.
Actually, I should really rename the output flags so they're not flags,
but instead just "caps", because that's really all that they are.
2015-02-04 15:40:22 -08:00
jp9000 24eaf77963 libobs: Fix typo, 'audio' instead of 'video'
For some extremely inexplicable reason, I somehow managed to use 'video'
for the audio data instead of 'audio'.
2015-02-04 15:40:21 -08:00
jp9000 fec29532de libobs: Removed unused parameter and variable 2015-02-04 15:40:21 -08:00
Jim 7ba0eb3d45 Merge pull request #354 from Radzaquiel/patch-1
Update hitbox.tv ingest servers list
2015-02-01 14:10:21 -08:00
Radzaquiel 6eeff3f2c5 Update hitbox.tv ingest servers list
(Updated from Hitbox API's list)
All cities/countries written
Changed: EU-North
Added: Russia, US-Central, South Korea, China & Oceania
2015-02-01 16:44:21 +01:00
Jim 4561548ee0 Merge pull request #351 from Gol-D-Ace/Twitch_ingest_Servers
Add Asia/Australia Twitch ingests
2015-01-31 21:40:02 -08:00
Gol-D-Ace cffe5d3ddf Add Asia/Australia Twitch ingests 2015-02-01 06:37:48 +01:00
Jim 9296334374 Merge pull request #345 from buscher/master
Initial obs-studio jack support
2015-01-26 12:31:10 -08:00
Jim e5e147a7c8 Merge pull request #347 from azatoth/mailmap
Adding .mailmap
2015-01-26 11:56:09 -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
Carl Fürstenberg 07996c1355 Adding .mailmap
Adding some authors to a .mailmap file to coalesce together commits made
by same authors, but not matching names.
2015-01-26 17:04:55 +01:00
Bernd Buschinski e04dc57e8a Initial obs-studio jack support 2015-01-25 20:42:02 +01: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
jp9000 af8d5db4ad libobs: Add obs_data_clear to clear settings
This function is intended to clear all settings outside of
default/autoselect values.
2015-01-24 22:09:24 -08:00
jp9000 b042e20e24 libobs: Fix obs_data_apply
obs_data_apply is used to apply the changes of a source object in to a
destination object.  Problem with this however is that if sub-objects
are in use, it currently just copies the pointer of the sub-object,
meaning that the source and destination will both share the same
sub-object via reference.  If anything modifies that sub-object data,
it'll modify it for both objects, which was not intended.

Instead of copying the object pointer, create a new copy and then
recursively repeat the process to ensure the data is always completely
separate.
2015-01-24 21:03:04 -08:00
Jim aabb911e9f Merge pull request #342 from hwdro/master
UI: Fix missing widget parent from constructor
2015-01-16 01:33:46 -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
Akagi201 471d87c940 obs-outputs: Add #pragma once to rtmp-helpers.h 2015-01-16 00:19:17 -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
jp9000 d54b3cc8c0 libobs: Update to 0.7.3 2015-01-14 23:05:37 -08:00
jp9000 111b516043 libobs-d3d11: Log available adapters 2015-01-14 21:28:08 -08:00
jp9000 389c0b95d6 libobs-d3d11: Log adapter ID 2015-01-14 21:28:08 -08:00
jp9000 1cb02d5879 libobs: Add function to enumerate video adapters
The gs_enum_adapters function is an optional implementation to allow
enumeration of available graphics adapters that can be used with the
program.  The ID associated with the adapter can be an index or a hash
depending on the implementation.
2015-01-14 21:28:01 -08:00
jp9000 05fc9c5b78 libobs: Fix calculation copying aligned textures
Direct3D textures are usually aligned to a specific pitch, so their
internal width is often not equal to the expected output width; this
means that if we want to use it on our texture output, that we must
de-align the texture while copying the texture data.

However, I unintentionally messed up the calculation at some point with
RGBA textures, so the variable size I was supposed to be using was
supposed to be multiplied by 4 (for RGBA), while I was still expecting
single channel data.  So, if the texture width was something like 1332,
the source (directx) texture line size would be somewhere at or above
5328 (because it's RGBA), then destination is at 1332 (YUV luma plane),
and it would unintentionally treat 3996 (or 5328 - 1332) bytes as the
unused alignment data.  So this fixes that miscalculation.
2015-01-14 14:57:27 -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
jp9000 0e81b0a2ac libobs-opengl: Use original lib naming for mac/win
On mac and windows, the libraries are always meant to be portable,
therefore the naming convention does not need to change for each
revision.  For linux this makes sense; windows and mac not so much.
2015-01-13 21:38:47 -08:00
Jim 881b3bd52a Merge pull request #332 from fryshorts/xcursor-crash-fix
linux-capture: Fix possible crashes
2015-01-13 18:02:40 -08: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
fryshorts 35ed828bc2 linux-capture: Fix crash on missing texture
Add a check to the cursor render function to ensure the cursor texture
exists. It seems like it is very unlikely but still possible, that the
first tick which should set the texture might fail. In that case obs
would crash in the render function.
2015-01-13 22:22:39 +01:00
fryshorts e009c7951d linux-capture: Fix possible null dereferences
Add checks for valid pointers when requesting the cursor information and
pixel data.
2015-01-13 22:19:47 +01:00
Jim 6d2226bde8 Merge pull request #326 from azatoth/plugin_lib
use multiarch compatible plugin lib path
2015-01-10 23:50:25 -08:00
jp9000 4ae68b3511 libobs: Whoops, use a 2 here instead of a 3
This file is GPL 2, not GPL 3.
2015-01-10 18:39:57 -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
jp9000 e8f2d1baba win-dshow: Update dshowcapture library to 0.4.2
Previously a DirectShow hardware encoder would get 'stuck' and couldn't
be recreated due to a strange issue with the graph filter not properly
shutting down the encoder.  This would make it so that the user could
only use the encoder once, and then it wouldn't work anymore any time it
was initialized again.  dshowcapture version 0.4.2 ensures that the
encoder can restart properly by manually shutting down the filter graph.
2015-01-10 13:20:46 -08:00
Jim 59dc77446c Merge pull request #327 from TheMuso/master
mac-capture: Add Sound Siphon as a supported audio routing device
2015-01-09 23:47:41 -08:00
Luke Yelavich 8dbb0cff6b mac-capture: Add Sound Siphon as a supported audio routing device
Add support for Static Z Software's Sound Siphon audio routing software
(http://staticz.com/soundsiphon/) which provides more advanced audio routing
possibilities.
2015-01-09 08:12:51 +11:00
Palana 1a53c8ca66 Rename parameters to avoid GLSL keyword conflicts
Refer to https://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf
for a list of current (reserved) keywords.

In the future the shader compiler in libobs-opengl should probably take
care of avoiding those name conflicts (bonus points for transparently
remapping the names of effect parameters)
2015-01-08 01:42:22 +01:00
jp9000 428a7def16 win-capture: Use PSAPI GetProcessImageFileName
If the PSAPI_VERSION macro is not set to 1 when using
GetProcessImageFileName, it will attempt to import it as
K32GetProcessImageFileName from kernel32.dll instead of psapi.dll, which
breaks compatibility with vista and xp.
2015-01-07 05:26:32 -08:00
jp9000 95f0b1065e win-dshow: Change "Device Preferred" text
Changes "Device Preferred" to "Device Default"
2015-01-07 05:23:03 -08:00
jp9000 ccfae7e287 rtmp-services: Fix setting of custom x264 profile
Profile was being set as a bool rather than a string, resulting in an
embarrassing situation where the profile was being set to 'true' rather
than the actual profile name.  ..There really needs to be a compiler
warning for using non-bools as bools.  This is one of the reason I
started using !! to change non-bools to bools.
2015-01-07 03:16:02 -08:00