0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
jp9000
d9251f9e87 Add source properties window (very preliminary)
- Add a properties window for sources so that you can now actually edit
   the settings for sources.  Also, display the source by itself in the
   window (Note: not working on mac, and possibly not working on linux).

   When changing the settings for a source, it will call
   obs_source_update on that source when you have modified any values
   automatically.

 - Add a properties 'widget', eventually I want to turn this in to a
   regular nice properties view like you'd see in the designer, but
   right now it just uses a form layout in a QScrollArea with regular
   controls to display the properties.  It's clunky but works for the
   time being.

 - Make it so that swap chains and the main graphics subsystem will
   automatically use at least one backbuffer if none was specified

 - Fix bug where displays weren't added to the main display array

 - Make it so that you can get the properties of a source via the actual
   pointer of a source/encoder/output in addition to being able to look
   up properties via identifier.

 - When registering source types, check for required functions (wasn't
   doing it before).  getheight/getwidth should not be optional if it's
   a video source as well.

 - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted
   libobs pointers

 - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to
   automatically disconnect them on destruction

 - Move the "scale and center" calculation in window-basic-main.cpp to
   its own function and in its own source file

 - Add an 'update' callback to WASAPI audio sources
2014-03-23 01:07:54 -07:00
jp9000
a9f5959b3c Fix an error and a few warnings
The strings didn't have ending double quotes.  No clue why this didn't
fail in GCC and VC.  Well, VC is horrible but I expected better out of
GCC.
2014-03-07 17:19:26 -07:00
jp9000
2448d0f229 Load up the lists of audio devices in settings
It will now load up a the list of audio input/output devices in the
combo boxes in audio settings.
2014-03-06 07:02:25 -07:00
jp9000
348588254c Add WASAPI audio capture
- Add WASAPI audio capture for windows, input and output

 - Check for null pointer in os_dlopen

 - Add exception-safe 'WinHandle' and 'CoTaskMemPtr' helper classes that
   will automatically call CloseHandle on handles and call CoTaskMemFree
   on certain types of memory returned from windows functions

 - Changed the wide <-> MBS/UTF8 conversion functions so that you use
   buffers (like these functions are *supposed* to behave), and changed
   the ones that allocate to a different naming scheme to be safe
2014-03-04 07:07:13 -07:00
jp9000
9c6da6f52d Split output/input audio capture sources
- Split input and output audio captures so that they're different
   sources.  This allows easier handling and enumeration of audio
   devices without having to do some sort of string processing.

   This way the user interface code can handle this a bit more easily,
   and so that it doesn't confuse users either.  This should be done for
   all audio capture sources for all operating systems.  You don't have
   to duplicate any code, you just need to create input/output wrapper
   functions to designate the audio as input or output before creation.

 - Make it detect soundflower and wavtap devices as mac "output" devices
   (even though they're actually input) for the mac output capture, and
   make it so that users can select a default output capture and
   automatically use soundflower or wavtap.

   I'm not entirely happy about having to do this, but because mac is
   designed this way, this is really the only way to handle it that
   makes it easier for users and UI code to deal with.

   Note that soundflower and wavtap are still also designated as input
   devices, so will still show up in input device enumeration.

 - Remove pragma messages because they were kind polluting the other
   compiler messages and just getting in the way.  In the future we can
   just do a grep for TODO to find them.

 - Redo list property again, this time using a safer internal array,
   rather than requiring sketchy array inputs.  Having functions handle
   everything behind the scenes is much safer.

 - Remove the reference counter debug log code, as it was included
   unintentionally in a commit.
2014-03-03 02:56:54 -07:00
jp9000
b4ef6cee91 Remove categories from properties
Categories added an unnecessary complexity to making properties, and
would very likely almost never be used in most cases, and were more of a
display feature.  The main issue is that it made property data more
complex to work with, and I just didn't feel comfortable with that.

Also, added a function to allow you to retrieve a porperty just by its
name.
2014-03-02 21:19:44 -07:00
jp9000
9db52da6a1 Fix non-VS compile issues
As usual, microsoft treats all enums as integers, rather than actually
even checking the enum type.  Worthless compiler.  Just complete
garbage.
2014-03-02 07:41:55 -07:00
jp9000
1eeece5b97 Simplify and improve 'list' property
When a source/output/etc has a property of a 'list' type, there was no
way to get the names associated with its values.  That, and it only
supported lists of either text, or enums (0..[value] only).

Now, you can associate translated names with those values, and use
integer, float, or string values.  Put it all in to one function as well
to simplify its usage.

I plan on using this to help get enumerations from devices/etc for
certain types of sources.  For example, if I get the properties of an
audio source, I'd like to have a list of available devices with it as
well.
2014-03-02 06:32:47 -07:00
jp9000
268e4e7811 Add more checks for NULL pointers 2014-02-23 22:39:33 -07:00
jp9000
b067440f73 Use bzalloc instead of bmalloc then memset
Reduces needless code repetition and still allows for proper memory
alignment.  Cleans up the code a bit.
2014-02-09 12:34:07 -07:00
jp9000
458325fc6f Add property list callbacks
- Add property list callbacks to sources/outputs/encoders so that if
  necessary user interface can be automatically generated or perhaps a
  property list widget can be used for them.

- Change some of the property API names.  obs_property_list_t felt a bit
  awkward when actually using it, so I just renamed it to
  obs_properties_t.

- Removed the getdata/setdata nad getparam/setparam functions from
  sources/services, they will be superseded by the dynamic procedure
  call API.
2014-02-01 22:46:13 -07:00
jp9000
0d17d13116 Implement properties definition interface
Implement a properties definition interface to allow modules to export
general properties associated with objects of libobs.

The properties definition interface allows the option for automatic
settings UI generation (which will make simple plugins easier to develop
without the need for user interface), as well as allow real-time
property editing of values of things like sources/outputs/etc without
having to open property dialogs.  More property types can be added in
the future as needed as well.
2014-02-01 18:01:31 -07:00