Commit Graph

129 Commits (acd8b612ee197dc6d408bf26e3c93f2f2e75108f)

Author SHA1 Message Date
bl 086e3f4a09 UI: Add GenerateSpecifiedFilename function
Maps specifiers and accepts ones that work across multiple OSes.

On some systems, depending on locale, the specifier may resolve to an
empty string or nothing.  GenerateSpecifiedFilename will avoid
conversion of the specifier if this happens, to help guard against this.
2016-03-25 03:28:53 -07:00
jp9000 544953c870 UI: Implement transitions and preview/program mode
Implements transitions, and introduces "Studio Mode" which allows live
editing of the same or different scenes while preserving what's
currently being displayed.

Studio Mode offers a number of new features:
  - The ability to edit different scenes or the same scene without
    modifying what's currently being displayed (of course)

  - The ability to set up "quick transitions" with a desired transition
    and duration that can be assigned hotkeys

  - The option to create full copies of all sources in the program scene
    to allow editing of source properties of the same scene live without
    modifying the output, or (by default) just use references.  (Note
    however that certain sources cannot be duplicated, such as capture
    sources, media sources, and device sources)

  - Swap Mode (enabled by default) which swaps the program scene with
    the preview scene when a transition completes

Currently, only non-configurable transitions (transitions without
properties) are listed, and the only transitions available as of this
writing are fade and cut.  In future versions more transitions will be
added, such as swipe, stingers, and many other various sort of
transitions, and the UI will support being able to add/configure/remove
those sort of configurable transitions.
2016-01-26 11:49:56 -08:00
jp9000 832043fc7f UI: Disable OSX V-Sync when program is open
OSX has an annoying feature called "BeamSync", which on later versions
of OSX is always on.  For whatever reason, Apple devs decided to force
this feature to always be on, so applications must always render with
v-sync regardless of what they set their swap interval to.

This issue would cause syncing to the vertical refresh for each
additional active display, and wouldn't allow rendering above the
current refresh rate.  This caused major rendering stalls and prevented
video frame timing from being accurate.

This fixes the issue by using an undocumented set of functions to
disable BeamSync.  Note that because this is an undocumented method of
working around the issue, its existence cannot be guaranteed.  If the
functions no longer exist for whatever reason, it will safely do
nothing.
2016-01-25 17:44:41 -08:00
Palana 124ccb68de UI: Allow file name generation without spaces
This will probably go away once proper file name formatting is
implemented (https://obsproject.com/mantis/view.php?id=361)
2015-11-27 15:48:30 +01:00
jp9000 34bbc444eb UI: Only inhibit when active or if projector open
Having sleep or screensavers inhibited at all times was causing some
annoyances for people.  Sleep/screensavers are now only inhibited when
the program is active or when a projector is open.
2015-11-16 09:08:55 -08: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 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 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 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
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
Palana 36ad777b8a UI: Add milliseconds to log timestamp when available 2015-07-19 06:30:11 +02:00
jp9000 af1014471d UI: Use os_mkdirs, remove redundant do_mkdir calls 2015-07-08 10:03:39 -07:00
jp9000 d3ba8c8af4 UI: Make XDG config path first if moving to XDG 2015-07-08 10:03:09 -07:00
Carl Fürstenberg ba02e065fe libobs: Add XDG config directory support
Adding XDG Base Directory Specification support for config dir

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Closes jp9000/obs-studio#348
2015-07-08 09:10:53 -07:00
jp9000 5e178c12e7 UI: Insert timestamps after log newlines
It was a bit weird seeing lines in the log without the associated
timestamps, so it should just insert it after every newline instead.
2015-07-06 17:03:31 -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 a781c5bdea UI: Add functions to create safe file names
Adds functions to generate safe file names from potentially unsafe
names.  Also a function to ensure that a particular filename isn't
duplicated.
2015-07-03 18:21:21 -07:00
jp9000 412fbfce82 UI: Make shortcut filter not filter dialog keys
With dialog boxes, the keys Enter and Escape are important for
accepting/rejecting the dialog.
2015-07-02 18:08:53 -07:00
jp9000 cb6c90a02c UI: Use platform.h for snprintf
This allows snprintf to be used in any file in the UI.
2015-07-02 17:18:47 -07:00
jp9000 8273d2cf6f UI: Remove redundant directory creation 2015-07-02 17:18:46 -07:00
jp9000 70795300ac UI: Fix typo in error 2015-07-02 17:18:44 -07:00
jp9000 4b422d7d23 UI: Replace os_get_config_path with GetConfigPath
This allows the UI to be able to use a custom config path for cases such
as portable mode, where the config path is relative to the executable.
2015-06-01 16:42:30 -07:00
jp9000 ea3496e512 UI: Add support for portable mode
Portable mode can be enabled via command line options (--portable or -p)
or by having any of the following files present in the base directory of
a portable install:

portable_mode
obs_portable_mode
portable_mode.txt
obs_portable_mode.txt

Portable mode is omitted when obs is built with a unix program
structure.
2015-06-01 16:42:29 -07:00
Palana 9cda23f4b9 UI: Add basic hotkey integration 2015-05-11 20:45:26 +02:00
Palana f1f1ca45df UI: Selectively disable focus frame
NoFocusFrameStyle was meant to disable focus frames around the scenes/sources
list (on OSX); unfortunately it also removed focus frames from controls that
should have focus frames like input boxes in the settings window
2015-05-07 02:08:09 +02:00
Jim ee284a56ac Merge pull request #424 from fryshorts/bsd-build-fixes
BSD build fixes
2015-05-05 04:46:16 -07:00
Kris Moore 29c7113dd7 UI: Add FreeBSD as a platform for version string
Add an additional ifdef to correctly identify FreeBSD as platform when
generating the version string.
2015-05-04 22:37:03 +02:00
GoaLitiuM 2c3510f0a7 UI: Define snprintf only for Visual Studios prior VS2015
This change is purely cosmetic one. _snprintf is still defined in 2015,
but Microsoft may change this in the future.
2015-05-04 19:33:55 +03:00
jp9000 167df61d03 UI: Add context menu to preview
Includes the ability to disable the preview and general source context
menu options (add/remove/filters/properties/etc)
2015-04-10 07:27:35 -07:00
jp9000 d42a7ce66e UI: Fix crash log handling
Using Qt to handle crash dialogs is too unstable, so better to just use
the windows API directly and display a windows message box just to be
safe.
2015-03-27 14:29:37 -07:00
Socapex 6a16778bc9 UI: Implement theme selection option
OBS will offer the user a list of themes which are .qss files inside
data/obs-studio/themes.  If no theme is found in the configuration, it
loads the default theme for the system.
2015-03-12 09:27:18 -07:00
jp9000 0c1d121ff2 Remove various unused variables
Unused variables detected by mingw
2015-02-09 03:49:13 -08:00
martell c0827212df UI: use _WIN32 instead of WIN32
_WIN32 is a compiler define so it should be used.  WIN32 is only valid
when it's defined in a header.
2015-02-09 03:41:58 -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
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 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 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
jp9000 c9df41c1e2 (API Change) Remove pointers from all typedefs
Typedef pointers are unsafe.  If you do:
typedef struct bla *bla_t;
then you cannot use it as a constant, such as: const bla_t, because
that constant will be to the pointer itself rather than to the
underlying data.  I admit this was a fundamental mistake that must
be corrected.

All typedefs that were pointer types will now have their pointers
removed from the type itself, and the pointers will be used when they
are actually used as variables/parameters/returns instead.

This does not break ABI though, which is pretty nice.
2014-09-25 21:48:11 -07:00
BtbN dfa2d992c1 Make application quit on main window close
This causes the main window to signal the application to exit and delete
its own pointer on close.  This fixes an issue where apparently some
windows that aren't explicitly connected to the main window would be
left open when the main window was closed because by default Qt will
only exit when all windows have been closed.

Because it deletes its own pointer, instead of storing it in a
std::unique_ptr, use a QPointer because it has an internal mechanism for
automatically tracking QObject deletion even if the deletion was not
done on the QPointer itself, where as unique_ptr does not have that
functionality.  In other words, if the pointer is deleted elsewhere for
whatever reason, the QPointer will still set that internal pointer value
to null.

(message and minor modificiations by Jim)
2014-07-23 00:02:13 -07:00
jp9000 633799f1c3 Use OBS_CONFIG as the actual version string
I didn't understand how tags worked so I was trying to filter it out
when I should really be using it for the actual version string.
2014-07-14 09:51:21 -07:00
jp9000 b7e0c9fb22 Parse obs-config.h version string to just the hash 2014-07-14 09:07:15 -07:00