0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

20 Commits

Author SHA1 Message Date
Palana
f29f4d8009 Unify obs_data_get* and obs_data_item_get* functions handling 2014-06-22 01:32:08 +02:00
jp9000
89df81e72d libobs: Add helper functions for math data 2014-06-14 23:57:00 -07:00
BtbN
0236d4fb09 Fix obs_data_item_set for number types 2014-05-10 03:38:33 +02:00
jp9000
21b67d007b Add helper functions to obs_data and fix bug
Add math helpers to the obs_data functions for vec2/3/4 and quat, and
fix a bug where it wouldn't load arrays from json
2014-04-26 23:45:41 -07:00
jp9000
3cbc711f02 Add obs_data JSON loading/saving functions 2014-04-24 01:45:56 -07:00
jp9000
950f780b81 Make sure ot use the right enum name
Microsoft's garbage compiler just doesn't even..  read the names of
enums.  It sees an enum and goes "durr, that's an int" without even
properly evaluating it.  Just total garbage, as per usual.
2014-03-16 20:44:27 -07:00
jp9000
291d9961cd obs-data: Internally store as int or double
If integers are used, then store as integers.  If doubles are used, then
store as doubles.  This way precision issues are prevented.
2014-03-16 20:38:13 -07:00
jp9000
154e0c59e1 Use atomic functions where appropriate
Also, rename atomic functions to be consistent with the rest of the
platform/threading functions, and move atomic functions to threading*
files rather than platform* files
2014-03-16 18:26:46 -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
268e4e7811 Add more checks for NULL pointers 2014-02-23 22:39:33 -07:00
jp9000
7fcec77351 For *_update, apply settings instead of replacing
Make it so obs_data settings input in to *_update are applied to the
existing settings rather than fully replace the existing settings.  That
way you can update with only certain specific settings, leaving other
settings untouched.  Of course if you're already using the original
settings pointer in the first place then you've already done that, so
it'll just ignore it because you've already applied them.
2014-02-21 21:05:21 -07:00
jp9000
966b943d5b Remove majority of warnings
There were a *lot* of warnings, managed to remove most of them.

Also, put warning flags before C_FLAGS and CXX_FLAGS, rather than after,
as -Wall -Wextra was overwriting flags that came before it.
2014-02-14 15:13:36 -07:00
jp9000
88519f0889 Add a bit more documentation
- Add bit more documentation to some of the main headers

- Fix alignment for the size of the name string of a obs_data_item.
2014-02-13 05:27:35 -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
Palana
a2cd42abf0 Remove external ref count visibilty from obs_data_* as well 2014-02-03 05:39:25 +01:00
Palana
935fa62db6 Add missing return type to function 2014-02-03 05:39:25 +01:00
jp9000
9116be8d9c Improve safety for settings usage
- Add 'set_default' functions to obs-data.*.  These functions ensure
  that a paramter exists and that the parameter is of a specific type.
  If not, it will create or overwrite the value with the default setting
  instead.

  These functions are meant to be explicitly called before using any of
  the 'get' functions.  The reason why it was designed this way is to
  encourage defaults to be set in a single place/function.

  For example, ideal usage is to create one function for your data,
  "set_my_defaults(obs_data_t data)", set all the default values within
  that function, and then call that function on create/update, that way
  all defaults are centralized to a single place.

- Ensure that data passed to sources/encoders/outputs/etc is always
  valid, and not a null value.

- While I'm remembering, fix a few defaults of the main program config
  file data.
2014-01-28 18:41:24 -07:00
jp9000
c6300d0956 Add a couple more setting data safety measures
Prevent null dereferencing if data is null, instead just make the
functions return and ignore the get/set requests.
2014-01-28 15:45:30 -07:00
jp9000
197c0b1fdd Fix a few bugs with the new data interface
There were some possibilities of NULL pointer dereferencing.  Also,
changed one small function to inline.
2014-01-28 01:51:25 -07:00
jp9000
6c44291693 Implement settings interface for plugins
Add a fairly easy to use settings interface that can be passed to
plugins, and replaced the old character string system that was being
used before.  The new data interface allows for an easier method of
getting/altering settings for plugins, and is built to be serializable
to/from JSON.

Also, removed another wxFormBuilder file that was no longer in use.
2014-01-27 23:14:58 -07:00