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

97 Commits

Author SHA1 Message Date
jp9000
54683c981a deps: Add liblmza
Used by the update module on windows.
2017-03-06 03:54:51 -08:00
jp9000
805611615e deps/blake2: Fix compiler warning 2017-03-06 03:54:48 -08:00
derrod
ca2bc6b4b0 libff: Add override for codec compatability check
In some cases the result of the compatability check is wrong.
For example the format "mpegts" only shows "mpeg2video" as an
encoder even though other codecs such as h.264 are supported by
ffmpeg's muxer for that container and are used within that container
in some applications.

Closes jp9000/obs-studio#804
2017-02-25 09:08:02 -08:00
Richard Stanway
8b640fae24
Fix various null pointer issues detected by Coverity 2017-02-25 16:45:45 +01:00
Richard Stanway
23a115b0b3 UI: Use blake2b instead of SHA1 for updater 2017-02-24 09:09:20 -08:00
jp9000
679c32086d deps/libff: Fix VP8/VP9/webm alpha support
FFmpeg by default decodes VP8/VP9 via its internal encoders, however
those internal encoders do not support alpha.  Encoded alpha is stored
via meta/side data in the container, so the only way to decode it
properly is via forcing FFmpeg to use libvpx for decoding.
2016-12-28 14:25:30 -08:00
jp9000
4f7ea15f42 Add libcaption library
Manually merging/squashing from: https://github.com/szatmary/libcaption
2016-12-23 10:37:06 -08:00
Kurt Kartaltepe
aff26d9840 libff: Allow custom demuxer options 2016-11-28 19:15:30 -06:00
jp9000
2f305cb550 win-capture: Use static runtimes for hooks/helpers
(Note: This commit also modifies the ipc-util/seg-service modules)

When compiling the final project, always compile
ipc-util/get-graphics-offsets/graphics-hook/inject-helper/seg-service
with static MSVC runtimes to prevent the need of requiring the MSVC
runtimes for both architectures.
2016-11-23 06:03:00 -08: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
Richard Stanway
65fcd20242
libff: Improved handling of EOF in the decoder threads
(Also modifies obs-ffmpeg to handle empty frames on EOF)

Previously the demuxer could hit EOF before the decoder threads are
finished, resulting in truncated output. In the worse case scenario the
demuxer could read small files before ff_decoder_refresh even has a chance
to start the clocks, resulting in no output at all.
2016-04-28 23:58:28 +02:00
Richard Stanway
dd6f8120b3
libff: Seek to frame 0 for sources with no duration 2016-04-25 01:05:32 +02:00
jp9000
45015db9d8 file-updater: Fix warning parameter
The parameter was being passed as a pointer instead of being
dereferenced
2016-04-24 12:59:55 -07:00
jp9000
672d0b3716 file-updater: Only use SSL ALPN opt if curl version up to date 2016-04-23 08:17:47 -07:00
Richard Stanway
15bec2a4d2
file-updater: Add missing dstr_free calls 2016-04-22 18:16:53 +02:00
Gol-D-Ace
674706ac6e Merge pull request #533 from sorayuki/patch-1
libff: Fix a race condition crash when handling clocks
2016-04-21 04:18:55 +02:00
sorayuki
a9b9b26afd libff: Fix a race condition crash when handling clocks
How to crash:
1. Use recent ffmpeg shared libraries.
2. Add a ffmpeg_source, a small static picture (e.g. jpeg) with loop
3. After a while of high cpu usage, it crashed. Seems reproduced more
easily on faster computer

Closes #533
2016-04-21 04:12:27 +02:00
Richard Stanway
5ddc3d258e
file-updater: Fix format string 2016-04-21 02:06:23 +02:00
Richard Stanway
f7fce1c802
file-updater: Add support for HTTP 304 Not Modified using ETag, disable ALPN 2016-04-21 02:03:14 +02:00
Richard Stanway
4c0b316130
libff: Small audio decoder loop refactor 2016-04-20 03:05:18 +02:00
Richard Stanway
bebaeaeaa9
libff: Fix heap corruption caused by unnecessary av_dup_packet call
There's no need to duplicate the packet as the reference count will be 1
after the av_read_frame call. Duplicating causes heap corruption when a
synthetic clock packet is duplicated and assigned the buffer from the
stack-based temporary packet which is then double-freed by the decoder
thread.
2016-04-20 03:05:04 +02:00
Christoph Hohmann
5e768990f2 deps/libff: Fix that inputs are not closed when a demuxer is freed
avformat_free_context() only frees the memory used by an AVFormatContext
but it does not close the opened media file. This causes a leaked file
descriptor every time a media source frees a demuxer. Using
avformat_close_input() instead frees the context and closes the media
file.
2016-04-10 18:53:26 +02:00
jp9000
2fd30407e6 deps/libff: Fix warnings with FFmpeg 3.0.0+
Fixes warnings with deprecated packet functions (av_free_packet and
av_dup packet, which were replaced by av_packet_unref and av_packet_ref
respectively)
2016-04-09 18:10:48 -07:00
sorayuki
07ecdaf8d3 deps/libff: Fix incorrect timer triggering (twice)
Sometimes the timer will be triggered twice in one request.  GIF files
can be rendered in wrong speed.

Closes jp9000/obs-studio#513
2016-03-24 02:42:18 -07:00
jp9000
c2f796660d deps/libff: Make libff use default frame discard method 2016-01-26 11:49:24 -08:00
jp9000
aa48c6e9bc deps/glad: Add support for glSwapIntervalMESA
Just in case glSwapIntervalEXT and glSwapIntervalSGI aren't available
for whatever reason.  This entire patch is most likely completely
redundant on modern mesa drivers.
2016-01-25 17:29:09 -08:00
jp9000
4a767e01ec deps/file-updater: Fix warning 2015-08-21 18:37:11 -07:00
jp9000
d3eaeda27c deps/file-updater: Add file updater util. lib
This allows plugins to update and cache data files from a remote source.

Here are the steps that occur when the API initiates an update check:

1.) It checks to see if the local files are greater than the cached
    files.  If the local version is newer (for whatever reason), it
    replaces the cached version(s) with the local version.

2.) A packages.json file is downloaded from the specified URL.  That
    packages.json file contains a version number and a list of files to
    be updated.

3.) If the downloaded package version is greater than the cached
    version, executes step 4-5 on each file.

4.) Checks the version for the file to update in packages.json, and if
    the version is greater than the cached version, proceeds to step 5,
    otherwise repeat step 4-5 for other files.

5.) Calls the callback given to the update function (if any) with the
    file information (file name, buffer, etc), and if the callback
    returns true, allows the cached file to be updated and replaced,
    otherwise goes back to step 4-6 for the rest of the files.

NOTE: Files are never modified directly.  All file saving/modification
is performed in a temporary directory, and then files are moved to their
destination.  This should eliminate any possibility of file corruption
(or at least dramatically reduce the possibility).
2015-08-19 15:48:04 -07:00
kc5nra
ff0c58e963 deps-libff: Adjust start_pts if invalid pts found
If the first guessed pts is less than the start_pts, it could
lead to a negative PTS being returned.

Change the behavior so that the first frame's pts, if zero, is
set to the start_pts.  If more than one frame is less than the
start_pts, the start_pts is determined invalid and set to 0.

Valid start_pts example:
  start_pts = 500

  first frame (pts = 0)
    pts = 500 (< start_pts)
    pts -= 500 (offset by start_pts)

    ret 0

  second frame (pts = 700)
    pts = 700 (no change, > start_pts)
    pts -= 500 (offset by start_pts)

    ret 200

Invalid start_pts example:
  start_pts = 500

  first frame (pts = 0)
    pts = 500 (< start_pts)
    pts -= 500 (offset by start_pts)

    ret 0
  second frame (pts = 300)
    pts = 300 (< start_pts, start_pts set to 0)
    pts -= 0 (start_pts is now 0)

    ret 300
2015-08-02 15:54:35 -05:00
jp9000
c87d3b1f12 cmake: Rename FindFFMpeg to FindFFmpeg
This was sort of driving me crazy: The 'm' in FFmpeg isn't supposed to
be capitalized.
2015-07-18 16:32:26 -07:00
Momcilo Medic
8421051831 deps-w32-pthreads: Update FSF address
Closes jp9000/obs-studio#453
2015-07-11 09:10:27 -07:00
Christoph Hohmann
e96c7c86b6 deps-libff: Fix stack corruption
ff_clock_init expects a parameter with a pointer where it stores the
address of the newly allocated ff_clock, but ff_demuxer_reset does not
provide this parameter. That somehow writes the pointer to the ff_clock
into the packet->base->buf field on the stack of the ff_demuxer_reset
function. This later causes a segmentation fault when the packet is freed.

Closes jp9000/obs-studio#448
2015-07-07 15:23:23 -07:00
jp9000
8ae0cd2492 ipc-util: Fix access rights issue with IPC pipe
This was the reason why game capture could not hook when the hook was
run at administrator level and the game/target was below administrator
level: it was because the plugin created a pipe, and the hook tried to
connect to that pipe, but because the pipe was created as administrator
with default access rights, the pipe did not allow write access for
anything below administrator level, therefor the hook could not connect
to the plugin, and the hook would always fail as a result.

This fixes the issue by creating the pipe with full access rights to
everyone instead of default access rights.
2015-07-05 15:17:08 -07:00
jp9000
6ed694f617 deps-libff: Fix starting timestamp bug
Certain input streams (such as remote streams that are already active)
can start up mid-stream with a very high initial timestamp values.
Because of this, it would cause the libff timer to delay for that
initial timestamp, which often would cause it to not render at all
because it was stuck waiting.

To fix the problem, we should ignore the timestamp difference of the
first frame when it's above a certain threshold.
2015-07-04 22:16:22 -07:00
jp9000
171f0e3d26 deps-libff: Offset start of stream by start pts
Now that we're using the timestamps from the stream for playback,
certain types of streams and certain file formats will not start from a
pts of 0.  This causes the start of the playback to be delayed.  This
code simply ensures that there's no delay on startup.  This is basically
the same code as used in FFmpeg itself for handling this situation.
2015-07-04 16:25:37 -07:00
John Bradley
6c4be20932 deps-libff: Fix pts diffs being adjusted wrongly
Removed code where if a PTS diff was greater than a certain
threshold it was forced to the previous PTS diff.  This breaks
variable length frame media like GIF.
2015-05-13 11:12:10 -05:00
Jim
ee284a56ac Merge pull request #424 from fryshorts/bsd-build-fixes
BSD build fixes
2015-05-05 04:46:16 -07:00
fryshorts
a02f2905b8 deps-jansson: Enable -fPIC for non-gcc compilers
Always use -fPIC when not on WIN32 or APPLE and not just with gcc.
This allows for building obs with clang on linux and FreeBSD
without explicitly specifying -fPIC as compiler flag to cmake.
2015-05-04 19:32:23 +02:00
GoaLitiuM
1e241bd24f jansson: Fix integer and real value formatting with VS2015
This is related to CRT changes in VS2015. All printf related functions
are now defined inline, which breaks the CMake's link time checking.
2015-05-04 19:33:54 +03:00
GoaLitiuM
e251d26560 w32-pthreads: Fix build errors with VS2015 2015-05-04 19:33:54 +03:00
fryshorts
42a9a0af3e deps-glad: Only link to libdl on Linux
Only link to libdl when on Linux. FreeBSD for example has this built
into their libc.
2015-05-03 14:38:24 +02:00
kc5nra
091a002c37 deps-libff: Add extensions to format description 2015-04-26 22:29:11 -05:00
Ethan Lee
fd4f2e29aa Buildfix for older FFmpeg versions (F20 RPMFusion) 2015-04-01 06:50:22 -04:00
kc5nra
0976126ebb deps-libff: Add ff codec/format utility functions
This adds utility functions for determining which
codecs and formats are supported by loaded FFMpeg
libraries.  This includes validating the codecs that
a particular format supports.
2015-03-30 17:30:29 -05:00
kc5nra
9f301cda94 deps-libff: Add extern "C" to all headers 2015-03-30 17:26:15 -05:00
kc5nra
36820a05e0 deps-libff: Link FFmpeg libraries 2015-03-30 17:26:15 -05:00
kc5nra
8effe2c635 deps-libff: Send NULL frame to callback if EOF
A null frame send to the frame callback signals
the end of media being played.  Null frames are not
sent for looped media
2015-03-24 00:18:48 -05:00
kc5nra
94e58057fd deps-libff: Fix sequence-point warning
Silly code that pre-incremented a value while also assigning
it to the same value.
2015-03-23 22:28:08 -05:00
kc5nra
f1f5484b16 deps-libff: Skip further decode refresh if aborted
Skip decode refresh scheduling if the abort flag is
set when the timer fails to start.  This avoids extraneous
refresh scheduling when tearing down the decoders.
2015-03-23 22:16:39 -05:00
kc5nra
f47b02df3f deps-libff: Add proper ff_timer_init error checks 2015-03-23 22:16:39 -05:00