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

932 Commits

Author SHA1 Message Date
Palana
f094bf199d (API Change) libobs: Make obs_output refcounted 2015-05-07 02:06:40 +02:00
Palana
a563fbc05b libobs: Add weak reference type for obs_source 2015-05-07 01:57:14 +02:00
Palana
99deb0821f libobs: Add refcounting helpers 2015-05-07 01:57:14 +02:00
Palana
a907d74903 util: Add os_atomic_compare_swap_long 2015-05-07 01:57:14 +02:00
jp9000
bf1ca59965 util: Add dstr functions to make upper/lower 2015-05-07 01:57:14 +02:00
Palana
ae19eec2c6 util: Improve handling of config values with linebreaks 2015-05-07 01:55:12 +02:00
fryshorts
e3901b2072 Revert "libobs: Fix missing getline on FreeBSD"
This is no longer needed since getline is only used in linux specific
functions now.
2015-05-06 21:39:17 +02:00
fryshorts
bc38bf641b libobs: Only log distribution info on linux
Add ifdefs to only log the distribution information on linux since this
is a platform specific implementation.
2015-05-06 21:39:17 +02:00
fryshorts
ceb1b218f1 libobs: Implement logging processor model on bsd
Implement the log_processor_info function on bsd and add ifdefs to only
build the implementation specific to the platform.
Also add an ifdef around the call to that function to make sure it will
only be called on platforms where it is actually implemented.
2015-05-06 21:39:17 +02:00
fryshorts
f5568ff586 libobs: Split up processor logging on nix
Split the function logging the processor information on nix into two
parts. The part logging the number of logical cores is portable and
works on all systems that support POSIX.1 while the other part is
specific to linux.
2015-05-06 21:15:24 +02:00
Jim
ee284a56ac Merge pull request #424 from fryshorts/bsd-build-fixes
BSD build fixes
2015-05-05 04:46:16 -07:00
fryshorts
7a33f27c72 libobs: Link against compat sysinfo on FreeBSD
Link against the compatibility library that provides sysinfo on FreeBSD.
2015-05-04 22:37:17 +02:00
Kris Moore
9c483aae10 libobs: Add support for FreeBSD to gs_window
Enable the X11 specific members in the gs_window struct when on FreeBSD.
2015-05-04 21:08:17 +02:00
fryshorts
d998c16724 libobs: Remove unused include
Remove unused include as it is not available on FreeBSD and was
therefore causing a build error.
2015-05-04 21:08:17 +02:00
Kris Moore
5803d921ae libobs: Fix thread naming on FreeBSD
Add the relevant header file needed on FreeBSD and utilize yet another
ifdef to call pthread_set_name_np as the function name differs from
those on the other platforms.
2015-05-04 21:08:17 +02:00
Kris Moore
013e97ff54 libobs: Fix missing getline on FreeBSD
Add definition on FreeBSD to enable getline in stdio, as it is not
(yet ?) available by default. According to the manpage getline was a
GNU extension but was standardized in POSIX.1-2008.
2015-05-04 21:05:55 +02:00
GoaLitiuM
2ab4c430e0 libobs: Define snprintf only for Visual Studios prior VS2015
This change is purely cosmetic one. _snprintf is still defined in 2015,
but Microsoft may change this in the future.
2015-05-04 19:33:55 +03:00
jp9000
9d82760405 libobs: Warn if source released after shutdown
Instead of letting this area of code crash, check to see if the core is
still active or not, and safely warn and ignore the release if so.
2015-04-30 05:14:38 -07:00
Palana
17ff1d94e6 util: Calculate buffer size for dstr_vprintf (C99) 2015-04-23 23:49:06 +02:00
jp9000
a736b01276 libobs: Log video format 2015-04-18 00:03:22 -07:00
jp9000
1b53215b99 libobs: Add function to get video format name 2015-04-18 00:03:21 -07:00
jp9000
4d002f588b (API Change) Remove encoder callback boilerplate
API Changed (in struct obs_encoder_info):
----------------------------------------
bool (*get_audio_info)(void *data, struct audio_convert_info *info);
bool (*get_video_info)(void *data, struct video_scale_info *info);

To:
----------------------------------------
void (*get_audio_info)(void *data, struct audio_convert_info *info);
void (*get_video_info)(void *data, struct video_scale_info *info);

The encoder video/audio information callbacks no longer need to manually
query the libobs video/audio information, that information is now passed
via the parameter, which the callbacks can modify.

The refactor that reduces boilerplate in the encoder video/audio
information callbacks also removes the need for their return values, so
change the return types to void.
2015-04-17 20:17:43 -07:00
jp9000
5c91d93d87 libobs: Refactor video/audio encoder conversion
I realized that the get_video_info and get_audio_info encoder callbacks
always have to manually query the libobs audio/video information.

This fixes that problem by passing the libobs video/audio information in
the structures passed to those callbacks so they don't have to query it
each time, reducing needless boilerplate code for encoders.
2015-04-17 20:17:43 -07:00
jp9000
1ee277ed33 libobs: Add preferred video format encoder funcs
Allows the ability to hint at encoders what format should be used.

This is particularly useful if libobs is currently operating in planar
4:4:4, but you want to force an encoder used for streaming to convert to
NV12 to prevent streaming issues.
2015-04-17 20:17:42 -07:00
jp9000
908a165d62 Add planar YUV 4:4:4 format support
Adds the ability to natively output with planar YUV 4:4:4.
2015-04-17 20:16:40 -07:00
jp9000
822d1ec3fc libobs: Add packed yuv to planar 4:4:4 conversion 2015-04-16 22:51:31 -07:00
jp9000
0f346561ff libobs: Refactor pack_lum to pack_shift
Allows the ability to specify the bytes to shift as a parameter.  Useful
for planar 4:4:4 conversion.
2015-04-16 22:48:54 -07:00
jp9000
7bc8dc3471 libobs: Add Planar444 conversion to effect 2015-04-16 22:43:46 -07:00
jp9000
a32f8a5d19 libobs: Fix RGB output
RGB output wasn't occurring due to the fact that the frame simply wasn't
being copied.
2015-04-15 18:41:09 -07:00
jp9000
cf28a8af22 libobs: Init source mutexes before calling create
Fixes a crash that could happen if any of the mutexes are used in the
create callback, or before the obs_source_init function is called.

I'm not sure how this function order slipped because it seems fairly
obvious that these mutexes should be created before the create callback.

Had this crash happen to me when creating a WASAPI output source, the
create callback of the WASAPI source creates a thread which outputs
audio, and that thread managed to call obs_source_output_audio before
the obs_source_init function was called, which in turn caused it to try
to use a null mutex.
2015-04-15 16:13:37 -07:00
jp9000
ab65df74e0 libobs: Increment new frame ref when first copying
When caching a new frame, keep a reference to the frame while copying to
ensure that the frame is not potentially destroyed for whatever reason
while that data is being copied.
2015-04-10 19:28:41 -07:00
jp9000
dde1a73132 libobs: Fix async texture data race
The obs_source::async_reset_texture variable can cause a data race
between threads to occur because it could be set to true in one thread
then changed back to false in another thread.  This could cause the
async texture to not update its size when it's supposed to, which can
cause a crash or corruption when copying data from a frame of a
differing size.

The solution to this is to:

- Delete the async_reset_texture variable, and make the
  set_async_texture_size function change the texture size if the
  async_width, async_height, or async_format variables differ from the
  frame's width/height/format.  Those variables are then only ever set
  in the libobs graphics thread.

- Make the cache_video function use separate variables from other
  functions to detect a change in size (due to the fact that the texture
  size should only be resized in the libobs graphics thread).  These
  variables are async_cache_width, async_cache_height, and
  async_cache_format, which are only be set in the thread that calls
  obs_source_output_video.

How to replicate the data race:

- On OSX, use window capture on a textedit window, then continually
  resize the textedit window.
2015-04-10 19:16:18 -07:00
jp9000
85a490c5e8 libobs: Remove out-of-context comment
This comment was originally for an older version of the code; I'm
guessing I forgot to remove it along with the code that it originally
belonged with.
2015-04-10 19:15:06 -07:00
jp9000
6e572d849f libobs: Don't use 'output' as a keyword in shader
The bilinear lowres scale effect was using 'output' for a variable,
which is apparently a reserved keyword in GLSL on macs.  This slipped
by me due to the fact that this didn't occur with OpenGL on my windows
machine.
2015-04-10 09:58:04 -07:00
jp9000
ea8327ce5b libobs: Always free effect if not cached
Fix an issue where effects that fail to compile will not properly free
their data if they cannot not be parsed or compiled.
2015-04-10 09:48:55 -07:00
jp9000
4e54c89f9c libobs: Fix full range min/max output
The minimum and maximum color range values were not being set by the
video_format_get_parameters function when full range was in use; I
assume it's because the expected min/max values of full range is
{0.0, 0.0, 0.0} and {1.0, 1.0, 1.0}, so I'm just making it so that it
sets those values if using full range.

Way to replicate the issue (windows):
1.) Create a win-dshow device capture source
2.) Select a device and set it to a YUV color format to enable YUV color
conversion
3.) Select "Full Range" in the color range property.
4.) Restart OBS, the device will then start up, but will display green
due to the fact that the min/max range values were never set, and are
left at their default value of 0.
2015-04-10 07:27:26 -07:00
jp9000
095159c23a libobs: Fix bug with filter bypassing
Due to a bad 'if' expression, when a filter that is not last in the
chain is disabled or being bypassed, it ends up still calling the
filter's video processing function unintentionally.

This fix makes sure that it only calls the appropriate render functions
if the next filter target is the source, otherwise it will just call
obs_source_video_render to process the next filter in the chain.

How to replicate the bug:
1. Create two crop filters on the same source
2. Give each crop filter a different distinct value
3. Disable both crop filters
4. The image would still be cropped
2015-04-10 07:27:26 -07:00
jp9000
13fd6ff064 libobs: Use bilinear low res scale effect
The normal scaling methods cannot sample enough pixels to create an
accurate output image when the output size is under half the base size,
so use the bilinear low resolution scaling effect in that case instead
to ensure a more accurate low resolution image.
2015-04-10 07:27:25 -07:00
jp9000
65517ea4cf libobs: Add low resolution bilinear scale effect
This effect preserves detail of images that are scaled below half size
by using sampling 9 pixels.
2015-04-10 07:27:24 -07:00
jp9000
b18e957d81 libobs: Add missing function definitions
Add missing function definitions for the lanczos and bicubic effects
2015-04-10 07:27:23 -07:00
jp9000
27a0749d8d libobs: Add func to set display background color
This function sets the background color for a display
2015-04-10 07:27:23 -07:00
jp9000
1a9c512f38 libobs: Add functions to disable main preview
If you don't need to see what's displayed, then this is particularly
useful for two reasons:
1. It reduces the number of draw/present calls
2. It can prevent issues with certain hardware setups where rendering on
   a monitor hooked up to a separate card can experience slowdowns
2015-04-10 07:27:22 -07:00
jp9000
ebfe477caf libobs: Add ability to disable displays
Sometimes it can be useful to turn off rendering to the display in order
to reduce the number of draw calls and present calls.
2015-04-10 07:27:21 -07:00
jp9000
54535753ee Revert "libobs: Add UI-independent plugin search paths"
This reverts commit 99c674e41f.

These commits were originally added to allow multiple user interfaces to
use the same plugins, but I soon realized that multiple user interfaces
can use multiple libobs versions, so each user interface should have its
own set of plugins to manage.  Some user interfaces may not wish to use
certain plugins anyway, so this fixes that issue as well.
2015-04-03 19:54:36 -07:00
jp9000
ec0048e05e Revert "Merge pull request #410 from bazukas/nix-modules"
This reverts commit 92d800cc18, reversing
changes made to 35a4acede0.

These commits were originally added to allow multiple user interfaces to
use the same plugins, but I soon realized that multiple user interfaces
can use multiple libobs versions, so each user interface should have its
own set of plugins to manage.  Some user interfaces may not wish to use
certain plugins anyway, so this fixes that issue as well.
2015-04-03 19:54:03 -07:00
Azat Khasanshin
6b066e9bc6 Add $HOME/.obs-plugins as default module search dir on Linux 2015-04-03 19:20:05 +03:00
jp9000
99060e5bf2 Update to 0.9.1 2015-03-27 12:24:54 -07:00
jp9000
c7e1878390 libobs: Use default blend state with scenes
Instead of manually setting the blend state to the desired values, use
gs_reset_blend_state to ensure we have the default blend state (which
for color is a typical srcalpha/invsrcalpha alpha blending operation,
then the alpha channels are added together).

This fixes an issue where filtered scenes would look strange due to the
fact that alpha was not being blended properly.
2015-03-27 11:22:58 -07:00
jp9000
be52fa26f9 Add gs_blend_function_separate
This allows the ability to separate the blend states of color and alpha.

The default blend state has also changed so that alpha is always added
together to ensure that the destination image always gets an alpha value
that is actually usable after the operation (for render targets).

Old default state:
  color source: GS_BLEND_SRCALPHA, color dest: GS_BLEND_INVSRCALPHA
  alpha source: GS_BLEND_SRCALPHA, alpha dest: GS_BLEND_INVSRCALPHA

New default state:
  color source: GS_BLEND_SRCALPHA, color dest: GS_BLEND_INVSRCALPHA
  alpha source: GS_BLEND_ONE,      alpha dest: GS_BLEND_ONE
2015-03-27 11:18:02 -07:00
jp9000
95f5a3c260 libobs: Clear current async frame if cache freed
If the cache is freed the current async frame will of course become
invalid, so make sure it's set to null if the cache is freed.
2015-03-27 10:03:47 -07:00
jp9000
3a90be39dd libobs: Deallocate lingering unused cache frames
This fixes an issue where cache frames would not free at all after
having been allocated with no upper limit on the cached frame size.  If
cached frames go unused for a specific period of time, they are
deallocated and removed from the cache.

This is preferable to having an upper cache limit due to the potential
for async delay filtering.
2015-03-27 00:07:16 -07:00
jp9000
f03e66fc99 Revert "libobs: Fix memory leak (Enforce cache limit)"
This reverts commit 4459ed3e2c.
2015-03-26 23:40:36 -07:00
jp9000
4459ed3e2c libobs: Fix memory leak (Enforce cache limit)
Under certain circumstances the cache could be prone to growing too
large unintentionally.  Setting a hard maximum limit should prevent
memory from growing if we suddenly get a lot of frames.
2015-03-26 22:59:48 -07:00
jp9000
6e22ac41b8 libobs: Swap async source frames in tick
Async frames are only swapping when rendering, or when not visible.
This is a flawed design due to the fact that there are certain
circumstances where the source is neither visible nor currently
rendering.

This is what caused a memory leak when scene items were marked as
invisible, because if a source has an async child source and decides not
to render that source for whatever reason, the child source would not
process the async frames at all, and the cache would just grow.

To fix this, simply moving the async frame cycle to tick fixes the issue
due to the fact that tick is always called regardless of circumstance.
2015-03-26 22:59:48 -07:00
jp9000
75ee8ff528 libobs: Update version number to 0.9.0 2015-03-25 14:14:41 -07:00
jp9000
621158f8e1 libobs: Fix warning
Removed this variable some time back, but didn't test on GCC (which
throws this warning), so I never knew about it until recently.
2015-03-25 14:14:40 -07:00
jp9000
74d886c2f8 libobs: Reorder filters based upon their type
If a filter is an async filter move above/below other async filters,
and similarly for effect filters move above/below other effect filters.
2015-03-25 10:03:20 -07:00
jp9000
b33d95999f libobs: Mark audio filters as async
Async filters and effect filters are really two different classes of
filters, so it's important that audio filters be marked as async.
2015-03-25 10:03:20 -07:00
jp9000
2b4fdb19ad libobs: Filter async video before rendering
Filtering the video before it's output to the texture means that it
happens after all the processing on the timestamps and such of the video
data.  This way, the video filter does not have to worry about what's
currently buffered, and it won't affect timing.
2015-03-25 10:03:19 -07:00
jp9000
a73816665c libobs: Simplify comment
These are basically just capabilities of a source, that and too much
text on one line.
2015-03-25 10:03:18 -07:00
jp9000
c16f1a7430 libobs: Add obs_get_source_output_flags function
Gets the output flags by its source type.
2015-03-25 10:03:17 -07:00
jp9000
1a70ae0105 libobs: Add missing function definition
obs_get_source_defaults was missing the definition for the function.
2015-03-25 10:03:17 -07:00
jp9000
0d8ae565f2 libobs: Add API to hide/show scene items 2015-03-25 10:03:16 -07:00
jp9000
f109be3010 libobs: Fix potential bug destroying filters
When OBS is shutting down, if for some reason the filter is destroyed
before the parent source is destroyed, it would try to remove itself
from the source, but it would decrement the reference and try to destroy
itself again while already in the process of destroying itself.

So, the solution was simply to make sure that if it's removing itself
from the source that it doesn't decrement its own reference.
2015-03-25 10:03:15 -07:00
jp9000
18afe82304 libobs: Skip filter if internal data not present
If the filter's binary was recently removed, the data will be invalid,
so make sure that it properly handles that situation by skipping the
filter.
2015-03-25 10:03:14 -07:00
jp9000
e31fea66be libobs: Add API to mute/unmute sources 2015-03-25 10:03:13 -07:00
jp9000
f04ef236ac libobs: Add ability to disable sources/filters 2015-03-25 10:03:13 -07:00
jp9000
98a6c8f0d0 libobs: Always enumerate filter list in reverse
The "last" filter that's rendered is technically at filter index 0, so
enumeration needs to be from the last index in the list to the first
index in the list.
2015-03-25 10:03:12 -07:00
jp9000
64943f3fc6 libobs: Lock mutex when changing filter order
Refactors the function a bit to ensure that the filter mutex is locked
when changing the filter order.
2015-03-25 10:03:11 -07:00
jp9000
dedc454caf libobs: Add "reorder_filters" source signal
Signals when the filter order has been changed for a source.
2015-03-25 10:03:10 -07:00
jp9000
4aa8f2d14b libobs: Fix bug when changing filter order
The 'idx' variable is the incorrect variable to be using here, the
variable that was supposed to be used was 'i'.
2015-03-25 10:03:09 -07:00
jp9000
86a0f370c3 libobs: Insert new filters at index 0
Technically, the "last" filter rendered is the filter at index 0, so
inserting a new filter at that point makes the most sense.
2015-03-25 10:03:08 -07:00
jp9000
c0cc81d20f libobs: Turn blending off for filter renders
When rendering a filter to a texture, the target is empty and unused, so
there's no reason for blending to be on when rendering the filter to a
render target.
2015-03-25 10:03:07 -07:00
jp9000
44e484ad34 (API Change) Fix filter rendering design flaw
obs_source_process_filter tried to do everything in a single function,
but the problem is that effect parameters would not properly be
accounted for due to the way it internally draws, therefore it was
necessary to split the functions in to two, you first call
obs_source_process_filter_begin, then you set your effect parameters,
then you finally call obs_source_process_filter_end.  This ensures that
when the filter is drawn, that the effect parameters are set.
2015-03-25 10:03:06 -07:00
jp9000
44f103de9c libobs: Fix rendering at end of the filter chain
When the filter chain finally reaches the source and the last filter in
the chain is set to not render directly (meaning it has to render to
texture), it would not render the source with any effect due to the fact
that it expects a filter to be present.
2015-03-25 10:03:05 -07:00
jp9000
7878fda442 libobs: Add filter_remove callback for sources
Adds a source callback function that is used when a filter is removed
from a source.  This ensures that any data that might be associated with
that source can be cleaned up if necessary.
2015-03-25 10:03:04 -07:00
jp9000
cd7d045ff3 libobs: Make filter mutex recursive 2015-03-25 10:03:03 -07:00
jp9000
c2775eaa3d libobs: Add obs_source_skip_video_filter function
This allows a filter to skip its step and move on to the next target in
the chain without affecting performance.
2015-03-25 10:03:02 -07:00
jp9000
f4af2fcadc libobs: Always clear render target filter
This fixes a bug where the previous contents of a filter's render target
texture might become visible if using alpha.
2015-03-25 10:03:01 -07:00
jp9000
dfde8d4a63 libobs: Use 'can_bypass' func for filter bypassing
There are a few more conditions which need to be checked to ensure
whether we can actually bypass or not; in this particular case we are
using the YUV texture shaders, plus the image can also be flipped, so we
can't really use the bypass optimization in those situations.
2015-03-25 10:03:00 -07:00
jp9000
b9eef3c4f2 libobs: Add API to get base source dimensions
These functions are primarily for use with filters, filters need to be
able to get the width/height of a target source without it necessarily
getting the post-filtered dimensions.
2015-03-25 10:02:59 -07:00
jp9000
506e30da10 libobs: Do not clear frame cache if 0,0 dimension
Previously I had it set so that it would set the async_width and
async_height variables to 0,0 if a null frame occurs, but the problem
with this is that it was inadvertently cause the frame cache to clear
when it starts receiving textures again because it detects it as a size
change.

So instead of changing async_width and async_height to 0 when a null
frame occurs, change it so that if the source is set to an inactive
state, make obs_source_get_width/_get_height return 0 for their
dimensions instead.
2015-03-25 10:02:58 -07:00
jp9000
26206f6af4 libobs: Use reference counting with source frames
When a frame is processed by a filter, it comes directly from the
source's video frame cache.  However, if a filter is using or processing
those frames for whatever reason, there would be no guarantee that the
frames would persist during processing, and frames could eventually be
deallocated unexpected, for example when the resolution or format
changes.

So the solution is to implement simple reference counting for the frames
so that the frames will exist until they have been released by any
source or filter that's using them.
2015-03-25 10:02:57 -07:00
jp9000
ebee67097a libobs: Prevent video cache clear on first frame
Fix a bug where when a source first starts up its async cache, it
unintentionally resets its cache, which means that the first few frames
would be lost.
2015-03-22 19:18:19 -07:00
jp9000
d44d3b1f0a libobs: Use locale-independent double conversion
Prevents issues on specific locales, especially where decimal points are
represented by commas rather than periods.
2015-03-22 19:18:07 -07:00
jp9000
4abae186ce libobs: Use alpha when rendering scenes
This is just in case a filter is applied to a scene, filters will turn
off the blending so it's necessary to set the blending.
2015-03-22 19:18:06 -07:00
jp9000
0a8e3a643c libobs: Add int/float slider properties
This optionally specifies that the int/float value should be displayed
with a slider rather than and up/down control.  UIs are not necessarily
required to implement it, it's meant to be more of a hint.
2015-03-22 19:18:06 -07:00
jp9000
9b238ef71e libobs: Add obs_get_opaque_effect function
This returns a common effect useful for rendering an image with the
alpha channel overridden to 1.0.
2015-03-22 19:18:04 -07:00
jp9000
e4305d147b libobs: Fix default negative int/float shader vals
If negative was specified it would not parse the negative sign and thus
would not interpret that number as negative, and would cause
shader/effect parsing to simply fail on the file.
2015-03-22 19:17:41 -07:00
jp9000
cdb27ac06b libobs: Add functions to push/pop blend states
This is particularly important for the filter pipeline in order to
ensure that when the last filter is reached that the original blend
state is properly reset.
2015-03-22 18:38:49 -07:00
jp9000
699201a06e libobs: Cache effects to prevent shader duplicates
Switching between shaders often can cause a performance hit, so cache
effects so that they persist until the graphics subsystem is destroyed.
2015-03-22 18:38:48 -07:00
jp9000
2fa37a1f2e libobs-opengl: Fix render targets being flipped
When render targets are used, they output to the render target inverted
due to the way that opengl works.  This fixes that issue by inverting
the projection matrix so that it renders the image upside down and
inverting the front face from counterclockwise to clockwise.
2015-03-22 18:38:45 -07:00
jp9000
13046145f7 libobs: Fix filter dimension issue
The wrong function was being used to recurse through the filter chain in
obs_source_process_filter, obs_source_get_[width/height] would get the
post-effect dimensions rather than the pre-effect dimensions.
2015-03-22 18:38:40 -07:00
jp9000
95e63992cb libobs: Fix filter rendering bug
The parameters order was wrong; sort of a rare thing to see, but it can
happen, especially when it's a function that's not used very often.
2015-03-22 18:28:12 -07:00
jp9000
76a9c90043 libobs: Clarify filter-related comments
Certain callbacks and API functions were a bit vague on when and how
they were supposed to be used.
2015-03-22 18:28:11 -07:00
jp9000
38cb1ed39b libobs: Make filter_video callback param non-const
The frame is definitely meant to be modifiable if needed, so it
shouldn't be const.  I originally meant for these frames to be
duplicated, but with the source video cache that's both unnecessary and
would reduce performance.
2015-03-22 18:28:11 -07:00
jp9000
001bfb4a6d libobs: Use nullptr instead of NULL 2015-03-21 16:34:46 -07:00
jp9000
644ac130f8 libobs: Only allow ComQIPtr on windows
ComPtr can be used for things like the DeckLink API, but ComQIPtr has
windows-specific compiler features, so can't be used outside of windows.
2015-03-21 16:34:46 -07:00
jp9000
ef4ee1fd1a libobs: Implement flags for properties
OBS_PROPERTIES_DEFER_UPDATE: Makes it so the properties are not updated
until editing of the properties is complete.
2015-03-19 15:57:03 -05:00
jp9000
0f31880c3c libobs: Fix bug (source resampler not resetting)
If the audio data had the same format/samplerate as the obs audio
subsystem, it would fail to simply destroy the resampler and set it to
NULL, and then any audio data going through would use the resampler that
was being used before that, causing audio to become garbage.

This bug only started appearing when I recently changed the libobs
internal audio subsystem format to non-interleaved floating point, which
is a common format, and thus caused this bug to actually occur more
often.
2015-03-13 01:03:01 -07:00