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

1097 Commits

Author SHA1 Message Date
jp9000
46feac7f8f libobs/graphics: Allow gs_render_sprite use without texture
Allows gs_render_sprite to be used without a texture as long as cx/cy
are set.  There's no reason why it shouldn't be able to do this.
2016-01-23 07:17:45 -08:00
jp9000
38f368aa80 libobs/util: Make all atomic funcs inline and use intrinsics
Needless function calls here for what should be intrinsic calls
2016-01-23 07:17:44 -08:00
jp9000
ac63bd819c libobs: Move windows headers to WIN32 section in cmake file
These were in the APPLE section by mistake
2016-01-23 07:17:43 -08:00
jp9000
4543cd168d libobs/util: Add long load/store atomic funcs 2015-12-28 05:49:55 -08:00
jp9000
8f7d8d05b2 libobs: Add sample_rate param to conv_frames_to_time
Prevents from having to query the base audio subsystem for the sample
rate each time the function is called
2015-12-22 06:18:21 -08:00
jp9000
96d9bf794c libobs: Store linked list of audio sources
Useful for going traversing the list of audio sources (particularly for
the new audio subsystem)
2015-12-22 06:18:20 -08:00
jp9000
a702d88c25 libobs: Don't track active transitions
This was originally used for calculating audio volume if transitions
were active, but transitions won't work that way so tracking the active
transitions is no longer needed.
2015-12-22 06:18:19 -08:00
jp9000
fc057f6d88 libobs/media-io: Add funcs to convert between nanoseconds/frames
Uses 128bit integer math to prevent overflow
2015-12-22 06:18:18 -08:00
jp9000
9f9a4bc3f3 libobs/util: Add uint128 structure/functions
Allows some limited 128bit integer math functions, primarily for the
sake of performing calculations on nanosecond-based intervals of time
2015-12-22 06:18:17 -08:00
jp9000
7a81d3d6d7 libobs/util: Add circlebuf pop_back/peek_back functions 2015-12-22 06:18:16 -08:00
jp9000
c2168cf9e8 libobs/util: Don't perform calculation until data checked 2015-12-22 06:18:15 -08:00
jp9000
c6914fda45 libobs/util: Add circlebuf_push_front function 2015-12-22 06:18:14 -08:00
jp9000
5be855e852 libobs: Make scene item visibility activate/deactivate
Before if a source was set to invisible it would still be considered
active.  This changes it so that the source is deactivated when the
source is invisible to reduce needless resource usage or capturing.
2015-12-22 05:49:03 -08:00
jp9000
c8f4fbe42b (API Change) libobs: Rename funcs relating to active child sources
Renames:
----------------------------------------
obs_source_add_child
obs_source_remove_child
obs_source_enum_sources
obs_source_enum_tree
obs_source_info::enum_sources

To:
----------------------------------------
obs_source_add_active_child
obs_source_remove_active_child
obs_source_enum_active_sources
obs_source_enum_active_tree
obs_source_info::enum_active_sources

These functions/callbacks had misleading names: they originally implied
any child sources, when they actually meant active child sources that
are being used to render video or audio.  It's important that the
function names represent their actual purpose.
2015-12-22 05:49:02 -08:00
Palana
684b43ccfa libobs: Move previously ineffective NULL checks 2015-12-22 05:49:02 -08:00
Palana
ec86bdaa09 libobs: Add obs_save_sources_filtered (skip)
(Note: This commit breaks UI compilation.  Skip if bisecting)

Adds a means of saving specific sources that the front-end chooses,
rather than being forced to use the now-removed "user list".
2015-12-22 05:48:59 -08:00
jp9000
70fec7ae8e (API Change) libobs: Remove "User sources list" (skip)
(Note: This commit breaks UI compilation.  Skip if bisecting)

API Removed:
------------------------
obs_add_source

API Changed:
------------------------
obs_source_remove: Now just marks/signals a source for removal

The concept of "user sources" is flawed: it was something that the
front-end was forced to deal with if it wanted to automate source
saving/loading, and often it had to code around it.  That's not how
saving/loading should work, a front-end should be allowed to manage
lists of sources in the way it explicitly chooses, and it should be able
to choose which sources it wants to save/load.
2015-12-22 05:48:43 -08:00
jp9000
59f0ba0c8a libobs: Add load/save signals for sources
These signals are meant to replace the add/remove signals.
2015-12-22 05:36:22 -08:00
jp9000
11922265de libobs: Keep reference to source when rendering 2015-12-15 01:11:11 -08:00
jp9000
d1f225e2e8 libobs/callback: Set default return values to 0/NULL
These functions created stack variables but never actually initialized
them.  If the calldata variable is invalid, the return values will be
the uninitialized stack value.
2015-12-15 01:11:10 -08:00
jp9000
091706920f libobs/util: Use malloc/free for temp darray allocations 2015-12-15 01:11:09 -08:00
jp9000
69ab209fdd libobs/util: Use correct dereferenced size with da_swap 2015-12-15 01:11:09 -08:00
jp9000
19969a27d5 libobs: Remove TODO (not used) 2015-12-15 01:11:08 -08:00
jp9000
e23a20874b libobs/util: Rename da_swap_item to da_swap
The name was inconsistent with the darray_swap function that it's a
macro for.
2015-12-15 01:11:07 -08:00
jp9000
2c8887b582 libobs: Update to version 0.12.4 2015-12-11 17:03:08 -08:00
jp9000
bb1b705cd3 libobs: Put obs_get_default_rect_effect back in temporarily
This function was removed even though the browser plugin was using this
function on mac, so this is being put back in temporarily while the
browser plugin is modified to remove this function.
2015-12-11 16:47:22 -08:00
jp9000
4e55cf1125 libobs/util: Add function deprecation defines 2015-12-11 16:45:31 -08:00
jp9000
725a36bc0f libobs: Update version to 0.12.3 2015-12-04 04:23:31 -08:00
jp9000
c32407d1df libobs/media-io: Increase TS smooth threshold to 70ms
With certain devices (AVerMedia C985 and LGP), audio timestamps are
bad, and a 50ms threshold of audio data "smoothing" (making consecutive
audio packets seamless with one another) isn't enough to handle bad
consecutive timestamp values.  After testing, 70ms sufficiently solves
the issue.
2015-11-28 16:42:32 -08:00
Palana
1cd98ae008 libobs/util: Fix config value line break unescaping
Given a config file with some value "foo=\\n" querying the value of foo
would return {'\\', '\n', 0}, instead of {'\\', 'n', 0}
2015-11-27 15:48:30 +01:00
jp9000
5548e62162 libobs: Update to version 0.12.2 2015-11-20 14:44:17 -08:00
jp9000
332359d286 libobs: If filter size invalid, skip filter
This shouldn't happen anymore because crop was fixed, but if a filter
returns 0x0 size and is invalid it shouldn't stop the filter chain.
Instead, it should just be skipped.
2015-11-20 14:07:15 -08:00
jp9000
d1cbb2742e libobs/util: Use SIGTRAP for os_breakpoint
SIGTRAP is the correct value to use to specify a breakpoint.
2015-11-18 18:59:54 -08: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
fa5c477826 libobs/util: Add os_breakpoint function 2015-11-18 12:42:15 -08:00
jp9000
c629bbe50f libobs: Always write crashing thread first 2015-11-18 12:42:14 -08:00
jp9000
598ae383bc libobs/util: Add atomic bool load functions 2015-11-18 12:42:14 -08:00
jp9000
14bfa07168 libobs: Fix unsigned expression warning
Fixes warning introduced by d7848f3cb7 that pops up in GCC:

warning: comparison of unsigned expression < 0 is always false
[-Wtype-limits]

The proper solution was to use the 64bit integer values with the clamp,
and then convert to a 32bit unsigned integer.
2015-11-16 08:22:55 -08:00
jp9000
717e2b6e66 libobs: Update version to 0.12.1 2015-11-15 09:49:24 -08:00
jp9000
d7848f3cb7 libobs: Fix "possible loss of data" warning
Fixes the following warning of MSVC:

warning C4244: '=' : conversion from '__int64' to 'uint32_t', possible
loss of data
2015-11-15 09:49:23 -08:00
Palana
ad5aec99ff libobs: Fix obs_data crash
Accessing objects inside obs_datas after obs_data_clear was called on the
parent obs_data causes a NULL dereference.

Reproduce with:
	obs_data_t *data = obs_data_create();
	obs_data_set_obj(data, "foo", NULL);
	obs_data_clear(data);
	obs_data_get_obj(data, "foo");
2015-11-14 15:57:21 +01:00
Palana
1b078f57d8 libobs: Add frame rate property 2015-11-14 15:37:59 +01:00
Palana
0b3fcb8b6e libobs: Add obs_data wrappers for media_frames_per_second 2015-11-14 15:37:59 +01:00
Palana
95487c3eec libobs/media-io: Add frame rate helpers 2015-11-14 15:37:47 +01:00
jp9000
1e1f442a61 libobs/util: Remove unnecessary allocations (win32)
Removes unnecessary allocations for the os_event_* and os_sem_*
thread functions
2015-11-11 16:52:48 -08:00
Richard Stanway
94b5bc222b libobs: Rename create_proccess to create_process 2015-11-06 18:25:53 +01:00
Richard Stanway
3671153a4f libobs: Don't use SPI_SETSCREENSAVEACTIVE on Windows
SetThreadExecutionState with ES_DISPLAY_REQUIRED has the same effect of preventing the screensaver from activating. Using SPI_SETSCREENSAVEACTIVE leaves the screensaver disabled system-wide if OBS crashes before it can re-enable it.
2015-11-05 03:58:26 +01:00
jp9000
a914bb24fa libobs/util: Add atomic functions for bool values 2015-11-03 15:03:39 -08:00
jp9000
fea4f75157 libobs: Update async video texture before effect filters
When an async video source is about to be rendered, the async texture
should be updated before any effect filtering occurs, rather than right
when it's about to render.

Fixes a few bugs:

- If the async texture hadn't drawn for its first time, and the source
  has an effect filter, it would never end up rendering the first
  frame due to the fact that it would fail on obs-source.c:2434 for the
  first filter, causing it to never actually render the source, and thus
  never get to a point in which it could call set_async_texture_size to
  establish the async texture width/height for the first time.

- Any time the async texture size changed, it would only update the
  async texture size at the end of the filter loop, which means that the
  first frame after a size change would use the old size for the filters
  rather than update to the new size right away.
2015-10-22 17:46:54 -07:00