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

2470 Commits

Author SHA1 Message Date
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
Palana
a5f78e6f92 win-dshow: Update libdshowcapture to 0.5.0
Changes:
- Prevent concurrent calls to EnumDevices (resolves a crash with
  some device filters (like the XCAPTURE-1) with multiple active
  dshow sources)
2015-04-10 22:33:43 +02:00
jp9000
0fbf112491 UI: Fix vec2 warning
Fix warning encountered on clang-504.0.40 on OSX 10.9:

obs/window-basic-main.cpp:2884:22: warning: suggest braces around
initialization of subobject [-Wmissing-braces]
		struct vec2 dir = {0.0f, 0.0f};
2015-04-10 10:07:56 -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
2054161717 UI: Add windows exe icon
Adds an icon to the executable file so the executable no longer shows up
without an icon.
2015-04-10 07:27:37 -07:00
jp9000
167e781b5e UI: Add fullscreen projector options
Add the ability to use a fullscreen projector for scenes, sources, and
the preview display.
2015-04-10 07:27:37 -07:00
jp9000
c68283042c UI: Add fullscreen projector class
This allows viewing a source, scene, or the main preview in a fullscreen
window.
2015-04-10 07:27:36 -07:00
jp9000
b7421aafde UI: Add up/down/left/right position shortcuts
Allows nudging of selected items in the direction pressed when the
preview window is focused.
2015-04-10 07:27:35 -07:00
jp9000
167df61d03 UI: Add context menu to preview
Includes the ability to disable the preview and general source context
menu options (add/remove/filters/properties/etc)
2015-04-10 07:27:35 -07:00
jp9000
1cfe72664a UI: Remove listbox selection if deselected
If the item currently selected in the source listbox is deselected in
the preview, then make sure to deselect it in the listbox as well.
2015-04-10 07:27:34 -07:00
jp9000
853e63765e UI: Remove redundant config settings
These are replaced by other settings in the global ini file.
2015-04-10 07:27:33 -07:00
jp9000
206ae650de UI: Rename "MainWindow" ini section
Rather than using [MainWindow] in the global ini, explicitly state
BasicWindow instead so we know it's for the basic user interface.
2015-04-10 07:27:33 -07:00
jp9000
0e4969535b UI: Allow right-clicking to select preview items
Allows selection of items by right-clicking on the preview as well
rather than just left-clicks.
2015-04-10 07:27:32 -07:00
jp9000
3816b0bff9 UI: Fix tooltips for scene move up/down buttons 2015-04-10 07:27:31 -07:00
jp9000
d18a164c78 win-dshow: Update libdshowcapture to 0.4.4
Adds the following changes:
- Prioritize YUV formats over non-YUV formats for performance and to
  prevent intermediary filters
- Directly connect filters when possible to avoid intermediary filters
2015-04-10 07:27:31 -07:00
jp9000
21deb26557 win-dshow: Ensure autoselected FPS updates formats
Fix an issue where if the FPS property is set to "Match Output FPS" it
will not show all the available video formats.
2015-04-10 07:27:30 -07:00
jp9000
75bc7d3153 win-wasapi: Fix timeout bug
The WaitForSignal message is supposed to return return true if the
handle was signaled, not if the wait timed out.
2015-04-10 07:27:29 -07:00
jp9000
1143b1d631 win-wasapi: Prevent repeating connect fail message
Fixes an issue where if the device can't be connected, it will
continually repeat the connection failure message.
2015-04-10 07:27:29 -07:00
jp9000
f3069e3ea5 text-freetype2: Prevent potential null dereference 2015-04-10 07:27:28 -07:00
jp9000
0e2a5d2de2 obs-outputs: Do not drop I-frames
When frames were dropped, it would also drop I-frames, which can mess
with the keyframe calculation of certain services that depend on
I-frames in their output protocol (such as HLS).
2015-04-10 07:27:27 -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
fryshorts
9cc56f2516 UI: Fix precision in float comparison helper
Use std::abs instead of abs to avoid loss in precision and also fix
the corresponding warning from clang (3.5.0):

warning: using integer absolute value function 'abs' when argument is
of floating point type [-Wabsolute-value]

Closes jp9000/obs-studio#414
2015-04-08 01:45:12 +02:00
Jim
917daff6ec Merge pull request #409 from jb55/nixos-install
NixOS installation instructions
2015-04-05 18:21:06 -07:00
Jim
8b472dc3a0 Merge pull request #408 from flibitijibibo/master
Buildfix for older FFmpeg versions (F20 RPMFusion)
2015-04-05 18:20:05 -07:00
Palana
70b2ffeee7 UI: Fix custom buffer size for simple output
The buffer size was being saved as 'VBufsize' while all read operations
tried to read 'Bufsize'
2015-04-04 22:17:10 +02: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
Jim
92d800cc18 Merge pull request #410 from bazukas/nix-modules
Add $HOME/.obs-plugins as default module search dir on Linux
2015-04-03 19:06:45 -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
35a4acede0 mac-capture: Get cursor visible setting on create
When display capture is created, the hide_cursor variable is not
initialized, so just initialize it to the setting in the create
function.
2015-04-02 17:48:22 -07:00
jp9000
a892fa9e33 mac-capture: Fix display capture cursor bug
The kCGDisplayStreamShowCursor option used with the dictionary does not
work if you assign @true or @false to it.  After some testing, it needs
to point to the id cast of either kCFBooleanTrue or kCFBooleanFalse in
order for it to work properly.

If it doesn't use either of those values, the display stream seems to
use its internal default, which on 10.8 and 10.9 is visible, and 10.10+
is invisible, which would explain why people on 10.10 couldn't get the
cursor to capture.
2015-04-02 17:47:53 -07:00
William Casarin
a2acfd7ff4 NixOS installation instructions 2015-04-02 15:51:32 -07:00
Ethan Lee
fd4f2e29aa Buildfix for older FFmpeg versions (F20 RPMFusion) 2015-04-01 06:50:22 -04:00
John Bradley
453b505637 UI: Ensure rescale res is non-null and length > 0 2015-03-31 15:49:43 -05:00
Jim
97ca9e0ea5 Merge pull request #407 from kc5nra/ffmpeg-output-stuff
More advanced ffmpeg output selection
2015-03-30 16:26:26 -07:00
kc5nra
b218957f38 UI: Add Format, Audio and Video ComboBoxes
Adds ComboBoxes for selecting format and audio/video
codecs. The ComboBoxes also show only valid codec
combinations for a particular container format.
2015-03-30 18:16:57 -05:00
kc5nra
f04be51947 obs-ffmpeg: Set channel layout to avoid warning 2015-03-30 17:58:44 -05:00
kc5nra
aa82340a1e obs-ffmpeg: Set stream time_base to avoid warnings 2015-03-30 17:58:44 -05:00
kc5nra
c53f8cbed8 obs-ffmpeg: Add format and codec id support
Allow specification of specific codec ids and container
format to muxing.
2015-03-30 17:58:37 -05:00
John Bradley
4c570826c2 obs-ffmpeg: Workaround for a64 encoder bug
the Commodore A64 codecs seem to deref the video frame
too many times causing a crash.  For now just skip if this
codec.
2015-03-30 17:30:38 -05:00