Commit Graph

803 Commits (f10fb07f0e24cb28643e014b5fd2cdcbd054b6e8)

Author SHA1 Message Date
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 6b4d267682 UI: Clear reconnect timeout if reconnect canceled 2015-09-11 08:23:03 -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 981ead18a3 UI: Refactor upgrade_settings function
This is a refactor to move the config file open/saving out of the
individual settings upgrade functions that may be called per file.
2015-09-10 19:56:29 -07:00
jp9000 fe164eca87 UI: Rename FFmpeg update func to upgrade_settings
This function should really be considered a function that upgrades
general config file settings.
2015-09-10 19:06:18 -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 4c3394f7bf UI: Use a default size for the properties window
When I changed the properties window to remove the .ui file, I forgot to
give it a default initial size.  This just sets it to 720x580 by
default.
2015-09-07 18:40:06 -07:00
jp9000 c23c0f4615 UI: Prevent writing endlessly repeating log entries
Limits similar log entries (determined by a simple hash function that
sums the characters) to certain number of lines in a row.  When a
different log entry occurs, it resets the repeat check and logs how many
times the last message was repeated.
2015-09-07 14:06:21 -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 2ebb6e60ce UI: Don't use activeRefs to determine if active
Due to certain design changes for delay, it's better to simply determine
whether outputs are active via booleans rather than an activeRefs
variable, which could get decremented more than once if say, the signal
for stopping the stream gets called more than once for whatever reason
(which may happen in the case of delay due to the way delay works)
2015-09-06 16:33:58 -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 ee9cb8a931 UI: Increase clarity of exit message 2015-09-06 16:33:56 -07:00
Jim 7e11c01e28 Merge pull request #468 from yogpstop/master
UI: Unify activeRefs changing method
2015-08-28 22:20:58 -07:00
jp9000 2ee4cc53be UI: Implement scene duplication (context menu) 2015-08-28 15:01:39 -07:00
yogpstop a1d8fb11e2 UI: Unify activeRefs changing method 2015-08-27 17:03:10 +09:00
jp9000 1a81cf46e5 UI: Delete backup file if deleting scene collection
I forgot to make sure that the backup file for a scene collection would
also be deleted if a scene collection is purposely deleted by the user.
2015-08-23 17:22:45 -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 2bd8ab7c09 (API Change) libobs: Add global module config path
API Changed:
---------------------------
From:
- bool obs_startup(const char *locale, profiler_name_store_t *store);

To:
- bool obs_startup(const char *locale, const char *module_config_path,
		profiler_name_store_t *store);

Summary:
---------------------------
This allows plugin modules to store plugin-specific configuration data
(rather than only allowing objects to store configuration data).  This
will be useful for things like caching data, for example looking up and
storing ingests from remote (rather than storing locally), or caching
font data (so it doesn't have to build a font cache each time), among
other things.

Also adds a module-specific directory for the UI
2015-08-19 12:16:20 -07:00
jp9000 0ce756acba UI: Update configs for new FFmpeg output changes
If a user was using FFmpeg output before pathc 0.12.0, they had to type
in the full file name to the FFmpeg output URL/Path box, which isn't
exactly compatible with the new settings.

This changes each profile's config file so that the FFmpeg output
detects whether files are used, and then extracts the file's directory
and extension and sets them accordingly to make it compatible with the
new FFmpeg file output handling.
2015-08-19 11:56:18 -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
jp9000 3488039e8c UI: Fix GCC 4.8 compilation issue
Apparently using QPointer container for the QObject being given to the
connect function makes it so it can't find the actual function to use.
I'm guessing this is incomplete functionality or a bug that existed in
GCC 4.8.  Doesn't happen in 4.9+.
2015-08-18 21:52:52 -07:00
jp9000 59592cf030 UI: When setting base res, use closest output res
When settings the base resolution, try to find the closest output
resolution to the old output resolution, and use that for its value.  If
the aspect ratio is about the same, then don't modify the value.  If the
aspect ratio is significantly different, then find the closest
approximation while keeping with the new aspect ratio.

This particular issue has been an annoyance for quite some time.
2015-08-16 14:41:43 -07:00
jp9000 23e60561cb UI: Initialize curl before starting the program
It's best to do the global curl initialization separately before any
curl functions are called.  Prevents initialization threading issues.
2015-08-16 08:08:13 -07:00
Palana b07b742fd3 UI: Save profiler data on exit 2015-08-12 15:30:30 +02:00
Palana 44b5afbd07 (API Change) libobs: Add profile_name_store_t parameter to obs_startup
Due to all the threads in libobs it wouldn't be safe to make that
parameter reconfigurable after libobs is initialized without adding
even more synchronization. On the other hand, adding a function to set
the name store before calling obs_startup would solve the problem of
passing a name store into libobs, but it can lead to more complicated
semantics for obs_get_profiler_name_store (e.g., should it always return
the current name store even if libobs isn't initialized until someone
calls set_name_store(NULL)? should obs_shutdown call
set_name_store(NULL)? Passing it as obs_startup parameter avoids
these (and hopefully other) potential misunderstandings
2015-08-12 15:30:29 +02:00
Palana 8d3db084e8 UI: Profile initialization 2015-08-12 15:30:28 +02:00
Palana 7c5d93b92a UI: Add basic profiler integration 2015-08-12 15:30:28 +02:00
Palana 2de89bee8c UI: Refactor OBSInit call 2015-08-12 15:30:28 +02:00
Palana 40b7a4c918 UI: Make bitrate map sample rate aware 2015-08-10 16:35:05 +02:00
Palana 979f00fd2d UI: Ignore disabled audio encoder bitrates 2015-08-10 16:35:04 +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 6e75c1877f UI: Remove windowless context #error 2015-08-05 01:07:14 -07:00
jp9000 e93ca4cd10 UI: Prune obs_display code from secondary windows
(Non-compiling commit: windowless-context branch)

Now that all obs_display related code has been moved to OBSQTDisplay,
we can prune a whole bunch of boilerplate code that had to be repeated
for the displays of each window.

Affects:
- Properties
- Filters
- Interact
- Projector
2015-08-05 01:07:13 -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 3422631152 UI: Refactor OBSQTDisplay for windowless context
(Non-compiling commit: windowless-context branch)

This makes it so that OBSQTDisplay now uses/controls an obs_display
object directly (rather than having the owner have to associate an
OBSDisplay with it).  It was separated before because the main window
for the basic UI would was using the "main preview" stuff before the
windowless context and had to be handled differently, so you couldn't
just associate an obs_display object with OBSQTDisplay, meaning that all
"secondary" previews such as properties/filters/etc had to handle the
obs_display alone, which caused a lot of needlessly duplicated code.

Also adds a DisplayCreated signal to allow owners to be able to add
callbacks and such on creation of the actual obs_display context.
2015-08-05 01:07:11 -07:00
jp9000 5c9325f3ea UI: Add windowless context #error 2015-08-05 01:07:07 -07:00
jp9000 2526910eb9 UI: Use get_win_ver (not GetVersionEx) 2015-08-01 14:51:23 -07:00
jp9000 66f7330a58 UI: Remove properties window UI file (not needed)
The properties window UI file has no point at this time.  It's just a
window with a widget inside of it.
2015-07-20 19:11:35 -07:00
Palana 4001767355 UI: Add missing override specifier
Found via clang-3.6, actual warning:
window-basic-main.hpp:406:14: warning: 'GetProfilePath' overrides
a member function but is not marked 'override'
[-Winconsistent-missing-override]
2015-07-19 06:30:35 +02:00
Palana 36ad777b8a UI: Add milliseconds to log timestamp when available 2015-07-19 06:30:11 +02: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 b39445f323 UI: Allow QT to be found via cmake variable 2015-07-11 10:11:57 -07:00
jp9000 1efb8491be UI: Use SaveProjectNow for scene collections
This fixes a bug where scene collections would not properly save when
modifying them.
2015-07-09 10:51:27 -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
Jim fff323a0d5 Merge pull request #450 from dodgepong/latest-crowdin-translations
Add latest translations from CrowdIn
2015-07-08 12:04:30 -07:00