Commit Graph

322 Commits (d78d0072a05e031a9671e36ee6e2e4930c3c012b)

Author SHA1 Message Date
jp9000 01e7a3c621 UI: Use empty scene for new scene collection
The user may not want their audio or their display to be captured when
creating a new scene collection.  Make new scene collections default to
fully empty.
2015-09-11 21:51:09 -07:00
jp9000 35b2ce565a UI: Always create a display capture on first run
For the sake of consistency, always create a display capture source on
the very first run of the program, just to have something displayed.

(NOTE: The only exception here is on windows 7/vista, which isn't ideal
for display capture, so it'll continue to be left blank)
2015-09-11 21:49:21 -07:00
jp9000 f10fb07f0e UI: Log an error if loading of a scene file failed 2015-09-11 21:45:51 -07:00
jp9000 44b34431be UI: Create default scene if no file found 2015-09-11 21:45:06 -07:00
jp9000 b574407c74 UI: Remove cbr/bufsize from simple output mode
CBR is now always on by default for streaming, so there's no reason to
have a setting for this in particular.  Still available in advanced
output settings of course, but simple output mode really should be kept
as simple as possible.
2015-09-11 08:43:10 -07:00
jp9000 a4f8d18948 UI: Move reconnect options to advanced settings
This is mostly just to remove the unnecessary clutter from the output
sections.  The reconnect settings are generally rarely modified by users
as it is.
2015-09-10 21:54:11 -07:00
jp9000 f592c33eec UI: Implement stream delay
When stream delay is active, the "Start/Stop Streaming" button is
changed in to a menu button, which allows the user to select either the
option to stop the stream (which causes it to count down), or forcibly
stop the stream (which immediately stops the stream and cuts off all
delayed data).

If the user decides they want to start the stream again while in the
process of counting down, they can safely do so without having to wait
for it to stop, and it will schedule it to start up again with the same
delay after the stop.

On the status bar, it will now show whether delay is active, and its
duration.  If the stream is in the process of stopping/starting, it will
count down to the stop/start.

If the option to preserve stream cutoff point on unexpected
disconnections/reconnections is enabled, it will update the current
delay duration accordingly.
2015-09-10 12:13:40 -07:00
jp9000 d1293b2b8a UI: Add stream delay options to advanced settings
I added stream delay options to advanced settings not just because I
feel it's an advanced option, but also to reduce clutter in the outputs
section and its sub-sections, which already have far too many options as
it is.
2015-09-10 12:13:40 -07:00
jp9000 84d5938af2 Revert "UI: Add confirmation when clicking stop stream"
This reverts commit a508c17f0a.

I realized that this would become more of an annoyance for most people
rather than anything helpful.  This has only happened only twice that I
am aware of in all the years that the program has been around.
2015-09-10 12:11:29 -07:00
jp9000 9d940249bb UI: Remove redundant log message
This log message is already used in the StreamingStop callback.
2015-09-06 16:57:57 -07:00
jp9000 a508c17f0a UI: Add confirmation when clicking stop stream
I decided to add a confirmation message box simply to prevent cases
where users may accidentally click "Stop Streaming".
2015-09-06 16:33:57 -07:00
jp9000 2ee4cc53be UI: Implement scene duplication (context menu) 2015-08-28 15:01:39 -07:00
jp9000 ebf3abf04e UI: Use saving functions for profiles/scenes
Replaces all the json/config loading/saving functions with safe
variants to reduce the chance of potential file corruption as much as
possible.

Also does a minor refactor of json writing by using
obs_data_save_json_safe for writing json files instead of manually using
obs_data_get_json and os_quick_write_utf8 each time.
2015-08-21 18:22:25 -07:00
jp9000 75dcd1ffa3 UI: Allow generated filenames for FFmpeg output
This changes the way the advanced output section's FFmpeg output
settings work by allowing the user to select whether they want to output
to a file or output to a URL, and makes it so file names are
automatically generated like other recording outputs.

If they choose to output to a file, it'll only require an output
directory similarly to how other recording outputs work.  They can
select a directory to output to rather than being required to type in a
full path and filename; the filename is automatically generated.  The
extension is also automatically retrieved from libff depending on the
format selected.

Otherwise if they have Output to URL selected, it'll show a simple edit
box where they can type in the target URL.
2015-08-19 11:56:18 -07:00
Palana 8d3db084e8 UI: Profile initialization 2015-08-12 15:30:28 +02:00
jp9000 f3b76a72c7 UI: Recalculate main preview scale on video reset
Fixes a minor bug introduced by the windowless graphics context merge.
When setting a new base resolution, it would not recalculate the preview
size, and the preview would display the wrong size until the main window
was resized by the user.  This patch makes it so that it calls the
recalculation function when the base resolution is changed to prevent
that from happening.
2015-08-08 01:00:20 -07:00
jp9000 1722425f22 UI: Move obs startup/shutdown to obs-app.cpp
Now that we aren't dependent upon a window for our context, we can
safely move the obs context creation/destruction to obs-app.cpp, and use
the OBSContext helper class to automatically shut down obs.
2015-08-05 01:07:22 -07:00
jp9000 f0b903435c UI: Change "main preview" to use OBSQTDisplay
(Non-compiling commit: windowless-context branch)

Gets rid of all functions/data related to setting up the main preview to
be associated with obs_reset_video and instead uses OBSQTDisplay for the
main window display (thus associating it with an obs_display object).
2015-08-05 01:07:12 -07:00
jp9000 1f1f03d920 UI: Make plugin search path use arch. bits in name
If on windows/linux, make the plugin search path also include the
architecture bits for its binary search path.
2015-07-16 01:32:14 -07:00
jp9000 3a974f5086 UI: Add SaveProjectNow function
This adds a function that allows saving the project now instead of
deferring it.
2015-07-09 10:51:22 -07:00
jp9000 fab5eb5ba3 UI: Properly ensure save on exit
I broke the save that happens on exit by making all project saves put on
the message queue.  The save on exit would put the save on to the
message queue, then by the time the save occurred obs would already be
shut down.

This just calls the save function directly rather than deferring it to
the message queue.
2015-07-06 19:00:25 -07:00
jp9000 9f6f6d632b UI: Remove all unused user sources on load
This temporarily fixes an issue where potential (for whatever reason)
stray sources that aren't associated with any scenes could be saved and
then persist with the save data on load.
2015-07-06 18:50:16 -07:00
jp9000 49501be2a3 UI: Fix potential deadlocks when saving
SaveProject calls obs functions that locks certain mutexes, and because
I made it so that SaveProject was being called inside of certain signal
handlers (which could already be locked in other mutexes), it could
cause a mutual deadlock with other threads.

This fix puts the main project saving code in to SaveProjectDeferred,
then pushes it on to the Qt message queue to safely save outside of
those locks.  It's a function that's perfectly safe to put on the
message queue because it will automatically be disabled in certain
circumstances where it would be unsafe to call, such as on shutdown.

This code will also make it so that the project will not needlessly be
saved more than once if the SaveProjectDeferred call was pushed multiple
times on to the queue.
2015-07-06 17:03:42 -07:00
jp9000 a0e42ff277 UI: Fix stream/recording startup/stop logging
I actually made the mistake of making these messages only display if all
outputs were no longer active.
2015-07-06 17:03:35 -07:00
jp9000 64d9dd77e7 UI: Fix update check logging (non-sparkle)
It currently says "Update check: latest version is x.x.x", which is a
bit confusion.  It should say "Update check: last known remote version
is x.x.x" instead.
2015-07-06 17:03:34 -07:00
jp9000 d0d799465b UI: Add large separator after obs initialization
This makes it so it's a bit more obvious when the primary initialization
has completed in the log file.
2015-07-06 17:03:33 -07:00
jp9000 a5b4330e7a UI: Don't log version in OBSBasic::UpdateTitleBar 2015-07-06 17:03:33 -07:00
jp9000 a903ae3103 UI: Fix logging for profiles/scene collections
This makes it so that the log message for altering scene collections
and/or profiles is now below, and then the separator below that.  This
makes it a bit more apparent that any loading/clearing/etc that happens
before the log message are associated with the log message.
2015-07-06 17:03:32 -07:00
Palana 7bb430efd0 UI: Clean up sourceSceneRefs when removing scenes
Previously the sourceSceneRefs were being cleaned up in
OBSBasic::SceneItemRemoved; due to changes in
e82018579b the signal handler that called
OBSBasic::SceneItemRemoved is now being removed before the scene
triggers its item_remove signals
2015-07-07 02:02:41 +02:00
jp9000 7c97e21a1f UI: Add menu options to open settings folders
Adds "Show Settings Folder" and "Show Profile Folder" items to the file
menu.
2015-07-03 18:35:33 -07:00
jp9000 f9314128ea UI: Add Profiles
Adds setting profiles to the basic user interface.  For each profile, a
subdirectory for the profile will be created in
[config_dir]/obs-studio/basic/profiles which will contain the settings
data for each profile.
2015-07-03 18:35:30 -07:00
jp9000 7d6a12f49e UI: Add scene collections
Adds scene collections to the menu bar, which allows you to duplicate,
rename, remove, or add clean new scene collections.

Scene files are now stored in ./obs-studio/basic/scenes directory with
filesystem-safe names.
2015-07-03 18:33:57 -07:00
jp9000 fabb99c35a UI: Add UpdateTitleBar function to basic UI 2015-07-03 18:21:23 -07:00
jp9000 650c8faaaf UI: Use default scaled res. of 1280x720 or equiv.
Originally this value defaulted to 1.5 downscaling, but on very high
resolution displays this would cause the default to be above 1280x720,
which is not ideal for streaming/recording due to the CPU usage
requirements.

Instead, it will now find the closest resolution with a pixel count
equivalent to or closest below 1280x720, and use that instead.
2015-07-03 10:26:18 -07:00
jp9000 b566428233 UI: Allow resize without timers
This prevents the weird stretching effect that occurs whenever a windows
is in the process of being resized by the user.

Originally it was intended as an optimization, but even on half-decent
computers it doesn't really have much benefit.
2015-07-03 10:10:58 -07:00
jp9000 b4fe4ae5b4 UI: Remove unused default config values 2015-07-03 09:57:53 -07:00
jp9000 daa4706eb7 UI: Move adv. rec. tracks if updating from 0.10.1 2015-07-03 09:57:52 -07:00
jp9000 44afc71636 UI: Log when output starts/stops 2015-07-02 18:18:34 -07:00
jp9000 da358da9a7 UI: Save project only on new changes 2015-07-02 18:08:55 -07:00
jp9000 4b93b42ded UI: Do not save at intervals
Saving at intervals is a poor way to handle saving issues in general.
Best to just save when something has been modified instead.
2015-07-02 18:08:54 -07:00
jp9000 c9f85f167c UI: Add OBSBasic::ClearHotkeys function
Add a function to clear basic window hotkeys to reduces potential code
duplication
2015-07-02 18:08:53 -07:00
jp9000 5fc21edc1f UI: Clear scene data before loading new scene data
Clear scene data before loading new scene files or when creating new
scene data from scratch.
2015-07-02 18:08:41 -07:00
jp9000 1d3251a993 UI: Save after creating default scene
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)
2015-07-02 17:56:05 -07:00
jp9000 4330065d7d UI: Add ClearSceneData to clean up all obs data
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).
2015-07-02 17:56:05 -07:00
jp9000 20b4a1c008 UI: Manually delete visibility item widgets 2015-07-02 17:56:04 -07:00
jp9000 e8f30f222d UI: Remove unused signal from basic main window 2015-07-02 17:56:02 -07:00
jp9000 3b16477480 UI: Store global audio sources in scenes file only
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.
2015-07-02 17:18:47 -07:00
Palana 82471d7539 UI: Ignore reorder signals from drag&drop reordering
Not ignoring these signals doesn't seem to break anything, but it
shouldn't be necessary to process them either
2015-06-28 05:09:46 +02:00
Palana 95857b4443 UI: Enable drag&drop reordering for scenes
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
2015-06-28 05:09:45 +02:00
Palana b543ea6231 UI: Make scene items serializable via QDataStream
This minimal implementation should be enough to drag&drop scenes between UI
elements in the same process in the future
2015-06-28 04:30:17 +02:00