Commit Graph

2228 Commits (8a32345071a72aab913d3828bf2bb367a5c3165e)

Author SHA1 Message Date
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 8db480416d obs-x264: Add "(None)" option for preset/tune 2015-02-04 16:52:01 -08:00
jp9000 398ae3e288 obs-x264: Use more common defaults
I feel like it's important to use simple defaults just in the case that
users might be confused about the encoder settings.
2015-02-04 16:52:01 -08:00
jp9000 0a14119ba6 obs-x264: Make property name a bit shorter 2015-02-04 16:52:00 -08:00
jp9000 ffd401fcc7 obs-x264: Clarify preset property
I feel like due to lack of user understanding, it's important to specify
that the higher the preset is (veryfast/superfast/ultrafast) the less
CPU that the encoder will use
2015-02-04 16:52:00 -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 cb8acd59ce libobs: Export obs_properties_apply_settings
I didn't think it would ever need to be exported, but this function is
actually useful for applying settings to properties (to call all of
their update callbacks based upon the settings) without necessarily
having to have an object associated with it.
2015-02-04 16:51:59 -08:00
jp9000 bd76f16564 libobs: Add functions to get an encoder's type
'obs_encoder_get_type' to get the type of an existing encoder, and
'obs_get_encoder_type' to get the type via its identifier
2015-02-04 16:51:58 -08:00
jp9000 0e398c89be libobs: Add obs_get_encoder_codec function
This allows the ability to get the codec of an encoder via its
identifier string
2015-02-04 16:51:58 -08:00
jp9000 0aec530e23 obs-x264: Set bitrate/bufsize max to 10 mil.
The max bitrate for the property was 100000 before, which felt a bit
low.  Might as well have a super high upper limit of 10 million.
2015-02-04 16:51:57 -08:00
jp9000 6682f79d4a obs-x264: Add more properties
Add CBR, CRF to properties so that it can be changed by the user.  If
CBR is on, CRF will be disabled.  Also added a 'Use Custom Buffer Size'
option to make it so that the buffer size will automatically be set to
the bitrate if its value is false.  This is primarily a convenience
feature for users.
2015-02-04 16:51:57 -08:00
jp9000 e1acd93002 obs-outputs: Remove trailing whitespace 2015-02-04 16:51:56 -08:00
jp9000 7c5034d58f obs-outputs: Add support for multi-track RTMP
Certain RTMP services will support multi audio tracks via RTMP.  This
updates librtmp with custom code that enables multiple streams per
connection to be used; each subsequent stream typically containing extra
audio tracks.  The audio encoder names are used to indicate the names of
tracks, and the name of the tracks are used for the stream keys for
those subsequent tracks.
2015-02-04 16:51:56 -08:00
jp9000 36666c6712 obs-outputs: Update to latest librtmp version
Should be all the fixes and updates made by R1CH, mostly bug fixes as
well as IPv6 support
2015-02-04 16:51:55 -08:00
jp9000 c0c24ab234 libobs: Add obs_encoder_set_name function 2015-02-04 16:51:55 -08:00
jp9000 d3f92ca5d6 obs-ffmpeg: Make FFmpeg a usable output
This makes FFmpeg usable as an output, and removes or changes most of
the code that was originally intended for testing purposes.

Changes the settings for the FFmpeg output to the following:
* url:             Sets the output URL or file path
* video_bitrate:   Sets the video bitrate
* audio_bitrate:   Sets the audio bitrate
* video_encoder:   Sets the video encoder (by name, blank for default)
* audio_encoder:   Sets the audio encoder (by name, blank for default)
* video_settings:  Sets custom video encoder FFmpeg settings
* audio_settings:  Sets custom audio encoder FFmpeg settings
* scale_width:     Image scale width (0 if none)
* scale_height:    Image scale height (0 if none)

The reason why scale_width and scale_height are provided is because it
may internally convert formats, and it may be a bit more optimal to use
that scaler instead of the pre-output scaler just in case it already has
to convert formats internally anyway (though you can do it either way
you wish).

Video format handling has also changed; it will now attempt to use the
closest format to the current format if available for a given video
codec.
2015-02-04 16:51:54 -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 f091f062f0 obs-ffmpeg: Do not use CBR by default for FFmpeg
The FFmpeg output source will now mostly be used for file output, so
using CBR by default makes no real sense.
2015-02-04 16:51:53 -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
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