Commit graph

18 commits

Author SHA1 Message Date
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
derrod a9d3b9cbd1 libobs: Clarify memalign ToDo item 2023-03-01 11:18:47 -05:00
tytan652 12657e4fcc libobs: Replace OBS_UNUSED with UNUSED_PARAMETER
OBS_UNUSED is not portable to MSVC.
2022-07-20 08:22:08 +02:00
Norihiro Kamae af3890a4a9 libobs: Cleanup unused-parameters
- Add OBS_UNUSED to unused function parameters
- Remove unnecessary UNUSED_PARAMETER
Also update libobs-opengl/
2022-07-19 11:01:00 -04:00
Richard Stanway c5965c8605 libobs: Log errors for bmalloc(0)
malloc(0) is implementation defined and almost always a mistake. I
believe we should be more like malloc and treat bmalloc(0) as an error
instead of tying to handle it. For now we can log an error in case 3rd
party plugins are broken, in the future I would suggest this becomes a
crash-worthy error.
2022-07-16 15:20:55 -07:00
Richard Stanway dbdbfe79d2 libobs: Deprecate base_set_allocator and make it no-op
Hopefully nothing is actually using this in the first place. As a
library libobs has alignment requirements so we should probably not
allow an application to replace our aligned mallocs with something else.
This also allows more aggressive optimizations inside libobs as the call
can be completely inlined into a libc malloc.
2022-07-16 15:20:55 -07:00
jpark37 3c09074ed5 libobs/util: Skip pointless free for null 2021-03-31 06:07:11 -07:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000 9e17f41caf libobs/util: Don't perform memalign trick of pointer null 2015-11-18 18:46:21 -08:00
jp9000 52d5a9b0b4 libobs/util: Breakpoint crash on "out of memory"
This forces proper crash handling to generate a stack trace.
2015-11-18 12:42:15 -08:00
jp9000 fd24d0de2f Use atomics for allocation counter
I was getting cases where the CPU cache was causing issues with the
allocation counter, for the longest time I thought I was doing something
wrong, but when the allocation counter went below 0, I realized it was
because I didn't use atomics for incrementing/decrementing the
allocation counter variable.  The allocation counter now always should
have the correct value.
2014-04-07 01:25:38 -07:00
jp9000 6c92cf5841 Implement output, improve video/audio subsystems
- Fill in the rest of the FFmpeg test output code for testing so it
   actually properly outputs data.

 - Improve the main video subsystem to be a bit more optimal and
   automatically output I420 or NV12 if needed.

 - Fix audio subsystem insertation and byte calculation.  Now it will
   seamlessly insert new audio data in to the audio stream based upon
   its timestamp value.  (Be extremely cautious when using floating
   point calculations for important things like this, and always round
   your values and check your values)

 - Use 32 byte alignment in case of future optimizations and export a
   function to get the current alignment.

 - Make os_sleepto_ns return true if slept, false if the time has
   already been passed before the call.

 - Fix sinewave output so that it actually properly calculates a middle
   C sinewave.

 - Change the use of row_bytes to linesize (also makes it a bit more
   consistent with FFmpeg's naming as well)
2014-02-09 05:51:06 -07:00
jp9000 e9ded173f1 add my signal/callback interface from another project, also update license of utility files to ISC 1.3 2013-12-25 22:40:33 -07:00
Palana e6017ec1ba changed allocation counter to uint64_t
also avoids format string confusion for bnum_allocs
2013-12-07 17:39:43 +01:00
John Bradley 21a0292f7a Removed unnecessary <malloc.h> include from bmem 2013-11-07 19:14:24 -06:00
jp9000 18834c6a45 some static analysis cleanup 2013-10-17 17:21:42 -07:00
jp9000 b44ba06543 fixed the alignment issues for good 2013-10-01 07:24:59 -07:00
jp9000 f255ae1922 first commit 2013-09-30 19:37:13 -07:00