Commit graph

42 commits

Author SHA1 Message Date
jp9000 01b274f1da UI: Rename 'obs' dir to 'UI'
This is to prevent confusion both when prefixing commits and when
reading the directory structure for the first time.
2016-08-27 20:19:45 -07:00
jp9000 b3de68fa22 UI: Add helper functions for getting program data dir
Adds C++ functions for getting system-local specific data directories
rather than user-specific data directories
2016-07-06 03:47:51 -07:00
jp9000 8932bd39d1 UI: Check to ensure window starts up inside a monitor
Fixes an issue where the main window would load off-screen if its last
saved position was inside a monitor that no longer exists.
2016-05-05 15:31:35 -07:00
jp9000 3bd4fe5409 UI: Add command line opts to start streaming/recording
These command line options allow the user to start streaming/recording
on program startup.
2016-04-13 19:01:08 -07:00
jp9000 b52c4f9634 UI: Add command line opt to start w/ specific scene 2016-04-13 19:01:07 -07:00
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
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
Palana 7c5d93b92a UI: Add basic profiler integration 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
jp9000 6e75c1877f UI: Remove windowless context #error 2015-08-05 01:07:14 -07:00
jp9000 5c9325f3ea UI: Add windowless context #error 2015-08-05 01:07:07 -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 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 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
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 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 c16e6cc6d7 Add license agreement dialog 2014-07-13 11:40:47 -07:00
Palana 0413ada9b5 Add helper function for locale (name) enumeration 2014-07-13 19:10:38 +02:00
Palana d41b9e2839 Move application initialization out of OBSApp constructor 2014-07-13 15:23:26 +02:00
jp9000 52ddee9755 UI: Add function to generate time/date filenames 2014-05-20 23:26:19 -07:00
jp9000 5ba8b09c9c Add help menu with log file uploading
Added github gist API uploading to the help menu to help make problems a
bit easier to debug in the future.  It's somewhat vital that this
functionality be implemented before any release in order to analyze any
given problem a user may be experiencing.
2014-05-18 17:44:10 -07:00
jp9000 cfaf0d32af UI: Add name/version to window title
Also, make the 'start stream' button say 'connecting...' when it's
initially trying to connect.
2014-05-15 14:04:18 -07:00
jp9000 345c70138e Add 'source selection' dialog
Add a 'source selection' dialog to replace the 'enter a name' dialog.
This new dialog allows you to make new instances of pre-existing sources
so that you can add a pre-existing source to a different scene, or in to
the same scene more than once.

Also started implementing locale.

Comtemplating switching to JSON-based locale later, so we can add things
like descriptions/disambiguation, and so we can use jansson's built-in
hash table when doing the string lookup.
2014-05-10 18:47:48 -07:00
jp9000 f2ee950746 Activate user-selected audio devices
- Fix a bug where the initial audio data insertion would cause all
   audio data to unintentionally clear (mixed up < and > operators, damn
   human error)

 - Fixed a potential interdependant lock scenario with channel mutex
   locks and graphics mutex locks.  The main video thread could lock the
   graphics mutex and then while in the graphics mutex could lock the
   channels mutex.  Meanwhile in another thread, the channel mutex could
   get locked, and then the graphics mutex would get locked, causing a
   deadlock.

   The best way to deal with this is to not let mutexes lock within
   other mutexes, but sometimes it's difficult to avoid such as in the
   main video thread.

 - Audio devices should now be functional, and the devices in the audio
   settings can now be changed as desired.
2014-03-07 17:03:34 -07:00
jp9000 e88ee06310 Move basic mode configuration to a separate file
Having everything in global.ini meant that if you wanted different
settings for studio mode, that it would also overwrite it for basic
mode.  This way, the settings for each mode are separate, and you can
use different settings for each mode.
2014-03-06 21:08:12 -07:00
jp9000 f09a9ed435 Apply a number of fixes to the main window
- Fix the size issue with list boxes on mac.  Was displaying the list
  boxes with an improper size.  Turns out it was just the wrong size
  policies on the frame below.

- Ensure the main windows are fully displayed *before* initializing
  subsystems.  This ensures that the graphics system will properly start
  up on macos, and allows the glitch fix.

- Made a workaround for weird QT glitch that would happen to the parent
  of a pure native widget that also has internal painting fully
  disabled.  (Should definitely write an example and report this bug on
  the QT forums)
2014-01-25 09:08:56 -07:00
jp9000 afeed34b7a Change the UI to Qt (work in progress)
--------------------------------------------------
Notes and details
--------------------------------------------------
Why was this done?  Because wxWidgets was just lacking in many areas.  I
know wxWidgets is designed to be used with native controls, and that's
great, but wxWidgets just is not a feature-complete toolkit for
multiplatform applications.  It lacks in dialog editors, its code is
archaic and outdated, and I just feel frustrated every time I try to do
things with it.

Qt on the other hand..  I had to actually try Qt to realize how much
better it was as a toolkit.  They've got everything from dialog editors,
to an IDE, a debugger, build tools, just everything, and it's all
top-notch and highly maintained.  The focus of the toolkit is
application development, and they spend their time trying to help
people do exactly that:  make programs.  Great support, great tools,
and because of that, great toolkit.  I just didn't want to alienate any
developers by being stubborn about native widgets.

There *are* some things that are rather lackluster about it and design
choices I disagree with though.  For example, I realize that to have an
easy to use toolkit you have to have some level of code generation.
However, in my personal and humble opinion, moc just feels like a
terrible way to approach the problem.  Even now I feel like there are a
variety of ways you could handle code generation and automatic
management of things like that.  I don't like the idea of circumventing
the language itself like that.  It feels like one giant massive hack.

--------------------------------------------------
Things that aren't working properly:
--------------------------------------------------
 - Settings dialog is not implemented.  The dialog is complete but the
   code to handle the dialog hasn't been constructed yet.

 - There is a problem with using Qt widgets as a device target on
   windows, with at least OpenGL: if I have the preview widget
   automatically resize itself, it seems to cause some sort of video
   card failure that I don't understand.

 - Because of the above, resizing the preview widget has been disabled
   until I can figure out what's going on, so it's currently only a
   32x32 area.

 - Direct3D doesn't seem to render correctly either, seems that the
   viewport is messed up or something.  I'm sort of confused about
   what's going on with it.

 - The new main window seems to be triggering more race conditions than
   the wxWidgets main window dialog did.  I'm not entirely sure what's
   going on here, but this may just be existing race conditions within
   libobs itself that I just never spotted before (even though I tend to
   be very thorough with race conditions any time I use variables
   cross-thread)
2014-01-23 11:53:55 -07:00
jp9000 c129cc37cb update API and implement preliminary ability to add sources to scenes 2013-12-30 06:56:39 -07:00
jp9000 399b0c8d10 apply configure video settings on startup 2013-12-22 23:40:07 -07:00
jp9000 991b5739d6 move libobs C++ bindings to libobs 2013-12-22 17:42:02 -07:00
jp9000 24c45458b5 use the preview window as the main window associated with the OpenGL context 2013-12-18 22:57:39 -07:00
jp9000 3d88a43520 add video settings code and set up default video setting values for the config 2013-12-16 00:07:08 -07:00
jp9000 7ba497fe61 add move constructor to wx connector class, add simple connector list class, add initial video settings class, update build files 2013-12-13 23:11:23 -07:00
jp9000 c5f497ec1d add settings data for general page, query available languages 2013-12-12 21:47:42 -07:00
jp9000 70290b8c2b fixed locale code, added locale files, made wx use locale files, fixed some bugs, and added platform-specific files to the main program 2013-12-07 10:22:56 -07:00
jp9000 8298fa4dc7 With the permission of my fellow contributors, I'm switching obs-studio back to GPL v2+ to prevent issues between this project and the original OBS project, and for personal reasons to avoid legal ambiguity (not political reasons, I admittedly would prefer GPL v3+) 2013-12-02 22:24:38 -07:00
jp9000 0aad78819c added initial config file stuff, set up a 'dummy' window to cause the graphics system to persist through window changes 2013-11-23 23:38:52 -07:00
jp9000 27be0a515b do first test drawing in wx 2013-11-22 20:43:48 -07:00
jp9000 4813c89cc6 renamed obs.cpp/hpp 2013-11-22 16:24:54 -07:00
Renamed from obs/obs.hpp (Browse further)