Commit Graph

3709 Commits (563d8efe462a7669b31011087428c3414506bf5f)

Author SHA1 Message Date
jp9000 563d8efe46 UI: Fix position of "hide projector cursor" checkbox 2016-06-27 15:11:05 -07:00
jp9000 c2257e0a0f UI: Add option to hide cursor over projector windows 2016-06-27 14:47:42 -07:00
jp9000 bc9d68e2ad text-freetype2: Do not set default text 2016-06-27 03:18:48 -07:00
jp9000 bd70e73c25 obs-ffmpeg: Use core count for output threads by default
Recent FFmpeg versions seem to have changed the default thread count for
most codecs to 1.  Use the max core count by default as it was
originally.
2016-06-27 03:18:40 -07:00
jp9000 670c655d41 cmake/external: Add function to install specific arch data file
Allows installing a single specific file to the data/[arch] directory.
2016-06-23 20:05:57 -07:00
jp9000 d3ece746f2 cmake/external: Fix a few external plugin script bugs
For install_external_plugin_bin_to_data and
install_external_plugin_bin_to_arch_data, they were using the
'plugin_target' variable instead of just 'target' for the plugin
directory output location, and they were using 'target' instead of
'additional_target' for the data/binaries they were supposed to be
installing.
2016-06-23 20:05:57 -07:00
jp9000 7c65337c75 w32-pthreads: Fully export library (MSVC)
Allows the library to be used by external plugins
2016-06-23 20:05:39 -07:00
jp9000 b012c7280a win-capture/graphics-hook: Fix vs2015 internal compiler error
Removing this union fixes the internal compile error that would occur on
visual studio 2015 update 2 and above when these variables were all in a
union.
2016-06-22 14:40:54 -07:00
jp9000 5cc59256e7 libobs: Fix 'set but unused' warnings 2016-06-22 14:10:43 -07:00
jp9000 41277f6cac libobs: Fix 'may be uninitialized' warning 2016-06-22 14:10:43 -07:00
jp9000 4a3804518d UI: Show "stopping" text on buttons when waiting for stop
The new cutoff timing fix means that streaming/recording has to remain
active for bit until the stream/recording has reached the expecting stop
timestamp.  This means that the buttons would continue to say "Stop
streaming/recording" while waiting for the output to stop itself at the
appropriate timing.

So instead of letting it do that and confusing the user, the buttons
will now say "stopping" when the button is pressed to indicate to the
user that the stream/recording is in the process of stopping.
2016-06-22 14:10:42 -07:00
jp9000 1bfa48ce42 UI: Clear reconnect when stream forcibly stopped
It wouldn't properly clear the reconnect information when the user
forcibly stops the stream while reconnecting, so when the user starts a
new stream after that it would erroneously display a lingering reconnect
message on the status bar.
2016-06-22 14:10:41 -07:00
jp9000 b738f496b5 libobs: Forcibly stop output if stopped during reconnect
This fixes an design flaw where a delayed output would schedule a
stop even while in the process of reconnecting instead of just shutting
down right away.
2016-06-22 14:10:40 -07:00
jp9000 e13dd53376 libobs: Fix output shutdown order
When obs_output_actual_stop is called on shutdown, it should wait for
the output to fully stop before doing anything, and then it should wait
for the data capture to end.  The service should not be removed until
after the output has stopped, otherwise it could result in a possible
memory leak on stop.  Packets should be freed last.
2016-06-22 14:10:40 -07:00
jp9000 d7db0b8b01 (API Change) libobs: Fix output data cutoff on stop
(Note: This commit also modifies obs-ffmpeg and obs-outputs)

API Changed:
obs_output_info::void (*stop)(void *data);

To:
obs_output_info::void (*stop)(void *data, uint64_t ts);

This fixes the long-time design flaw where obs_output_stop and the
output 'stop' callback would just shut down the output without
considering the timing of when obs_output_stop was used, discarding any
possible buffering and causing the output to get cut off at an
unexpected timing.

The 'stop' callback of obs_output_info now takes a timestamp with the
expectation that the output will use that timestamp to stop output data
in accordance to that timing.  obs_output_stop now records the timestamp
at the time that the function is called and calls the 'stop' callback
with that timestamp.  If needed, obs_output_force_stop will still stop
the output immediately without buffering.
2016-06-22 14:10:39 -07:00
jp9000 29e849e355 libobs: Move output/encoder shutdown to independent thread
obs_output_end_data_capture could cause a hard lock due to mutex lock
ordering, depending on what thread it was called in.
2016-06-22 03:08:44 -07:00
jp9000 7018c6039d libobs: Do not allow output stop calls more than once 2016-06-22 03:08:43 -07:00
jp9000 ceb675f6df libobs: Use atomics for certain output boolean variables 2016-06-22 03:08:32 -07:00
jp9000 5137f8b6c0 UI: Fix case where invalid bitrate would be shown
Fixes a case where an astronomically large bitrate could be shown
unintentionally.
2016-06-20 02:56:33 -07:00
jp9000 605590606f obs-outputs: Remove send_remaining_packets
Because output stop timing has been fixed, there is no need to send the
remaining packets in the queue because it now just waits for the stop
timing anyway.
2016-06-20 02:56:33 -07:00
jp9000 3d53cf3a6c libobs: Store system timestamp DTS on packets 2016-06-20 02:28:52 -07:00
Jim e3deb718bb Merge pull request #555 from jumoog/master
rtmp-services: Nood add offical recommends
2016-06-16 15:19:17 -07:00
Kilian von Pflugk bc2b31f10b rtmp-services: Nood add offical recommends 2016-06-16 23:58:27 +02:00
jp9000 dc04acdb44 vlc-video: Add ability to add directories to playlist 2016-06-15 16:20:36 -07:00
jp9000 d0eae5d0e6 image-source: Add ability to add directories to slideshow 2016-06-15 16:20:12 -07:00
jp9000 55dc235d3e UI: Add ability to add directories to editable lists 2016-06-15 16:19:25 -07:00
jp9000 9948eee6c2 libobs/util: Add function to get path extension 2016-06-15 16:18:56 -07:00
jp9000 aa88b323aa libobs: Do not draw transitions if size 0 2016-06-15 16:18:43 -07:00
jp9000 d32424e5ad win-capture: Reset d3d9 capture if device recreated
Fixes a bug where if a D3D9 program recreates its device the capture
would become invalid.  Certain games (especially blizzard games) will
completely recreate their Direct3D device if a critical D3D9 error
occurs.
2016-06-11 12:27:06 -07:00
jp9000 b5df4537a9 libobs: Fix null pointer dereference w/ null private sources 2016-06-11 12:27:05 -07:00
jp9000 03b2ca65cf libobs: Only lock audio meter/fader when accessing data
Fixes an issue where the audio meter/fader would call an obs function
and lock another mutex, potentially causing a mutual inverted lock in
another thread.
2016-06-11 11:36:46 -07:00
jp9000 d89299fc1a vlc-video: Add VLC video source
Adds the ability to add video playlists via libvlc instead of via the
media source.  This is mostly just being added as a secondary option to
the media source to reduce maintenance costs and save time.  Currently
libff cannot pause/unpause/seek, and isn't programmed to handle
playlists yet.

If VLC is installed on the computer (with the same architecture) it will
allow video playback via libVLC.  In the future, users should be able to
optionally download VLC libraries via the installer as well if they
don't want to necessarily install VLC to get the plugin working.

This plugin performs runtime linking instead of compile-time linking;
compiling VLC is not required, only its headers are required.  To
compile, clone the VLC repository and set the VLCPath cmake variable to
point to the VLC repository directory.
2016-06-06 23:53:59 -07:00
jp9000 fb1ff173f9 libobs: Fix crash with 4:2:0 async source resolutions
When using GPU conversion for 4:2:0 frames on async video sources, it
would create a texture bigger than necessary and try to copy too much
data from the frame, resulting in a crash.
2016-06-06 23:46:56 -07:00
jp9000 695278dd42 libobs/util: Do not append .so w/ .dylibs on OSX 2016-06-06 23:46:55 -07:00
Jim aded8fccc3 Merge pull request #551 from kazukioishi/master
win-dshow: Fix audio output mode not showing up
2016-06-05 19:33:38 -07:00
jp9000 57d580f8a9 linux-capture: Convert window strings to UTF-8 strings
The UI expects everything to be in UTF-8, so convert all window strings
to UTF-8 whenever getting a window name.
2016-06-05 19:25:37 -07:00
jp9000 6eea842d9a UI: Do not store prop. view string data as QString
The internal data of a property value would be converted to QString and
Qt would inevitably try to convert the characters to another encoding,
causing the internal data to possibly become invalid.  Instead, use
QByteArray to treat it as nothing more than a byte array.
2016-06-05 19:25:36 -07:00
jp9000 5d16e44899 linux-capture: Fix window capture crashes
The xcomposite window capture crashes were due to a few factors:
-------------------------------
1.) The source's X error handler was possibly being overwritten by
another part of the program despite us locking the display, presumably
something in Qt which isn't locking the display when pushing/popping its
own error handler (though this is not yet certain).  The source's calls
to X functions happen in the graphics thread, which is separate from the
UI thread, and it was noticed that somehow the error handler would be
overwritten almost seemingly at random, indicating that something else
in the program outside of OBS code was not locking the display while
pushing/popping the error handler.

To replicate this, make it so that the source cannot find the target
window and so it continually searches for it each video_tick call, then
resize the main OBS window continually (which causes Qt to push/pop its
own error handlers).  A crash will almost always occur due to BadWindow
despite our error handling.

2.) Calling X functions with a window ID that no longer exists,
particularly XGetWindowAttributes, in conjunction the unknown error
handler set in case #1 would cause the program to outright crash because
that error handler is programmed to crash on BadWindow for whatever
reason.  The source would call X functions without even checking if
'win' was 0.

3.) The source stored window IDs (in JSON, even if they've long since
become invalid/pointless, such as system restarts).  This is a bad
practice and will result in more cases of BadWindow.

Fixing the problem (reducing the possibility of getting BadWindow):
-------------------------------
Step 1.) Deprecate and ignore window IDs in stored settings.  Instead of
using window IDs to find the window, we now must always search the
windows and find the target window via the window name exclusively.
This helps ensure that we actually consistently have a working window
ID.

Step 2.) Do not call any X functions if the window ID is 0.

Step 3.) Reset the window ID to 0 any time the window has updated, and
make the source find the window again to ensure it still exists before
attempting to use any X functions on the window ID again.
2016-06-05 00:12:43 -07:00
Kazuki Oishi 7328c2e2d7 win-dshow: Fix audio output mode not showing up 2016-06-05 00:27:28 +09:00
jp9000 1c37200549 libobs/util: Check for null pointer before calling dlclose
Apparently dlclose can crash if you use it with a null pointer.
2016-05-30 16:03:01 -07:00
nd f7ac9258d4 obs-filters: Change async delay filter max delay to 20 sec
Closes jp9000/obs-studio#549
2016-05-30 10:42:16 -07:00
jp9000 6ca3cd3504 win-capture: Fix VS2015 update 2 compiler error
Having volatile variables inside of a union causes a C1001 compiler
error in visual studio 2015 update 2.

Closes jp9000/obs-studio#544
2016-05-28 09:40:49 -07:00
Jim 2a6d85b4c5 Merge pull request #548 from fryshorts/pulse-fix
linux-pulseaudio: Check for failed operations
2016-05-28 09:27:45 -07:00
fryshorts eed9547197 linux-pulseaudio: Check for failed operations
Add checks to make sure the pulseaudio operation objects are actually
valid and the request did not fail right away. Other pulseaudio
functions dealing with the objects expect them not to be NULL,
otherwise they will kill the application with a failing assert.
2016-05-28 13:19:16 +02:00
jp9000 1a72cd4007 obs-ffmpeg: Set AVCodecContext thread_count to 0
For some reason in the FFmpeg output, this AVCodecContext variable is
being set to 1 by FFmpeg itself somewhere, and it's causing a massive
slowdown when encoding with FFmpeg directly.  This should be set to 0 to
specify to use as many threads as necessary.
2016-05-27 10:18:02 -07:00
hwdro e3847109be libobs/graphics: Add SSE intrinsics for matrix4_transpose 2016-05-26 22:13:01 -07:00
hwdro 017d77b399 libobs/graphics: Remove redundant variable assignment 2016-05-26 22:12:54 -07:00
jp9000 3deae76395 win-dshow: Update libdshowcapture to 0.5.10
Fixes a crash with audio format enumeration
2016-05-26 15:24:16 -07:00
jp9000 e73546b521 image-source: Don't repeat same image when randomizing
When randomizing the image slide show, do not repeat the same image more
than once in a row
2016-05-26 12:12:35 -07:00
jp9000 8da65b5c99 image-source: Add option to randomize slideshow 2016-05-26 11:35:29 -07:00