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

261 Commits

Author SHA1 Message Date
Clayton Groeneveld
e0df5e8868 deps/media-playback: Fix buffering/sync issues 2020-02-13 05:14:34 -06:00
Clayton Groeneveld
9730b270a7 deps/media-playback: Simplify seek/time code 2020-02-10 23:03:04 -06:00
LiamCoal
2b7f4dfa6b media-playback: Unbuffered Media Source
When using an IP camera on a local network, we wanted to minimize
delay. In order to achieve minimum delay, we allowed Media Source to
set BufferingMB to 0, and when it is 0, also enable AVFMT_FLAG_NOBUFFER
in the AVFormatContext flags.
2020-02-07 20:38:06 -08:00
jp9000
65d38864b6 deps/media-playback: Fix formatting 2020-02-01 21:51:20 -08:00
Jim
4cae7c55a1
Merge pull request #2300 from cg2121/media-pause-seek
media-playback: Add functions to pause/seek media source
2020-01-30 18:30:36 -08:00
Jiaxun Yang
6366f6ab59 libobs: Build SIMDE on platforms without SSE2
SIMDE was introduced for aarch64 support, however, the library itself
supports non-SIMD fallback, which allows us provide support to other
platforms without code changes.

There is another world beyond x86. So we can simply enable SIMDE for
processors without SSE2 support.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
2020-01-22 15:41:15 +08:00
jp9000
345e933d9f deps/obs-scripting: Fix incorrect parameter type 2020-01-21 02:43:21 -08:00
Clayton Groeneveld
f24c1004c1 media-playback: Add functions to pause/seek media source 2020-01-12 01:08:01 -06:00
Jim
8870676667
Merge pull request #2287 from pkubaj/patch-1
CMake: Fix build on ppc64
2020-01-04 03:37:25 -08:00
pkubaj
03ab727495 CMake: Fix build on ppc64
ppc64le was fixed before, but ppc64 (big-endian) was still failing.
2020-01-04 02:19:38 -08:00
Scratch
41fcb9ae08 obs-scripting: Add Python functions for frontend events 2020-01-03 12:07:17 +11:00
Rat
83fdf41e3f deps/obs-scripting: Expose matrix3 & 4 to scripting
Various functions available in the scripting API aren't usable
currently since you can't create the matrix3 and matrix4 needed
for their arguments.
2019-12-25 00:37:31 +01:00
Jim
2a6baf9886
Merge pull request #2069 from pgwipeout/aarch64
Enable Aarch64 support via SIMDe
2019-11-25 23:56:43 -08:00
jp9000
9826528c31 deps/media-playback: Don't use interrupt cb for local files
This fixes an issue where local files were using the avformat interrupt
callback, which is only supposed to be use to prevent blocking on
network calls.
2019-11-25 23:04:06 -08:00
jp9000
2fae85ab4a deps/media-playback: Don't exit thread on AVERROR_EXIT
The interrupt callback is designed to prevent the media source from
blocking; FFmpeg will internally call it periodically to prevent FFmpeg
function calls from blocking too long, and allow the caller to determine
whether blocking should stop.

The problem with this however is that AVERROR_EXIT causes the thread to
completely exit.  This fixes it so that it treats it as an EOF rather
than as an abnormal error.
2019-11-25 23:04:06 -08:00
Peter Geis
64d0b7fcb4 libobs: Enable compilation on aarch64
Add arch checks to enable aarch-compat layer on aarch64, retain normal
gcc intrinsics on x86 and ppc64.
2019-11-25 13:04:21 -05:00
Jim
654508de7c
Merge pull request #2183 from ratwithacompiler/macos-python-fix-2
obs-scripting: Fix Python in new MacOS .app bundles
2019-11-18 19:46:09 -08:00
jp9000
6ab6fdffd1 deps/obs-scripting: Fix formatting 2019-11-17 18:06:56 -08:00
Rat
a19fef2248 obs-scripting: Fix Python in new MacOS .app bundles
The current scripting directory path given to Python on OSX is
`../data/obs-scripting`. This works when bin/ and data/ are in the same
folder like rundir after a compile and in the old .app bundles but the
new normal .app bundle structure is different.

For bundles move obspython.py and _obspython.so to the binary folder,
just like the Lua one, and pass that bin path to the Python interpreter
so it can find it.

The current working dir isn't guaranteed to be set with .app bundles
so look up binary path at runtime.
2019-11-17 22:11:44 +01:00
Jim
9bdb21205d
Merge pull request #2085 from ratwithacompiler/macos-python-fix
obs-scripting: Fix Python on MacOS
2019-11-14 20:38:53 -08:00
Jim
def6fcb0ee
Merge pull request #2125 from DDRBoxman/appbundle
Fixes to make OBS work on Catalina
2019-11-13 12:21:13 -08:00
Colin Edwards
32690926b9 CI: Use custom macdylibbundler for OSX deps 2019-11-03 00:00:38 -05:00
jpark37
7336226774 obs-scripting: Quiet CMake SWIG warnings 2019-10-15 21:08:30 -07:00
Jim
7d34034ee2
Merge pull request #2099 from ioangogo/LinuxCaptionFix
cmake: Compile option to fix libcaption linking
2019-10-15 11:25:05 -07:00
Matt Gajownik
51be039cf8 CMake: Build Windows modules with file descriptors 2019-10-15 21:34:12 +11:00
luz.paz
d124e6402c docs/sphinx: Fix various typos
(This modifies UI, libobs, deps/obs-scripting, various cmake files)

Found using:
`codespell -q 3 -S *.ini,./UI/data/locale,./deps/w32-pthreads -L aci,dur,iff,mut,numer,uint`
2019-10-14 17:19:38 -07:00
Ioan Loosley
5483de10ee cmake: Compile option to fix libcaption linking 2019-10-07 12:57:54 +01:00
Rat
a44ff34ef0 obs-scripting: Link _obspython as dynamic_lookup on MacOS
_obspython.so currently links directly against python as @rpath/Python
and has 3 common python install paths set as rpaths so it would only
work if a user had python installed at one of those hardcoded paths.

Don't link _obspython against python at all but instead link it with
"-undefined dynamic_lookup" so when it is imported by python all it's
undefined python symbols get resolved at runtime against the user
supplied python instance loaded into the process earlier.

The rpaths aren't needed anymore this way.
2019-09-26 23:42:33 +02:00
Rat
e7801e10ba obs-scripting: Fix python lib path on MacOS
The libpython .dylib files on MacOS are in the python_path/lib
subdir. The user supplied python_path still needs to be to the actual
python root and not lib/ as the root path get's used as python home dir
so just add lib/ when loading the dylib.
2019-09-26 23:37:00 +02:00
jp9000
86572935af deps/media-playback: Remove cuda for hardware decoding
Cuda appears to be a bit buggy and can result in corruption where as
it's not being seen with other hardware decoders.  Remove cuda for now
as a hardware decoder to prevent the possibility of corruption.
2019-08-29 12:06:55 -07:00
jp9000
43957286d7 deps/media-playback: Fix hw decode dropping last few frames
Fixes a bug where hardware frames would not transfer to RAM for the last
few frames of a video.  The 'ret' variable can be 0 even though there
are still frames ready.
2019-08-29 11:55:49 -07:00
VodBox
c2a2bc5e40 deps/media-playback: Use hwaccel with non-alpha WebM files 2019-08-27 22:57:59 -07:00
jp9000
707f83f57d deps/media-playback: Fix memory leak
The hardware accelerated decoder context needs to be explicitly unrefed
when it's no longer in use, otherwise it and many resources associated
with it will leak.
2019-08-24 18:15:25 -07:00
jp9000
94581952b5 deps/media-playback: Fix hw accel decode crash
When hardware accelerated decoding is enabled, sometimes it can't
initialize for whatever reason, so it will fall back to software on its
own.  When this occurs, it will not use the hardware pixel format on the
frame; instead it will defer to a standard format on the frame.  So if
the frame format does not match the expected format, assume software
decoding.  (This was also what the hw-decode.c FFmpeg example did if the
format did not match the expected format)
2019-08-24 18:12:02 -07:00
Jim
5f7ff6fbcc
Merge pull request #1970 from cg2121/fix-warnings
various: Fix compiler/theme warnings
2019-08-17 08:22:03 -07:00
Jason Francis
34c8538ab9 cmake: Fix SWIG deprecation warnings 2019-08-16 21:12:31 -04:00
Clayton Groeneveld
e8ad89fc75 libobs, obs-scripting, vlc-video: Fix compiler warnings 2019-08-15 03:00:06 -05:00
Jim
444991ba21
Merge pull request #2021 from jpark37/yuva-format
Add support for YUV alpha formats
2019-08-11 20:38:17 -07:00
jpark37
1e87df89bb deps/media-playback: Convert YUV alpha formats to RGB on GPU
I40A -> RGBA, 1080p, CPU
swscale (MMX), Intel i7-6700: 1910 us -> 0 us

GPU measurements used Intel GPA with SetStablePowerState.

I40A -> RGBA, 1080p, GPU
Intel HD Graphics 530: 0 us -> 677 us
NVIDIA RTX 2080 Ti: 0 us -> 43 us
2019-08-11 11:26:52 -07:00
jpark37
6600bd13ea deps/media-playback: Add missing header to CMake 2019-08-11 07:27:42 -07:00
Michael Fabian 'Xaymar' Dirks
cdc613a5ea obs-scripting: Use a recursive mutex for Lua scripting
This enables stacking of Lua driven filters of the same kind without
freezing OBS Studio in place, or even crashing.
2019-08-08 22:57:35 -07:00
jp9000
68a5a40df9 libobs, obs-ffmpeg, win-dshow: Fix FFmpeg 4.0 deprecation
Fixes FFmpeg 4.0 deprecation warnings.
2019-07-29 20:34:13 -07:00
jp9000
a3fface27f win-dshow, obs-ffmpeg: Add hardware decoding support
Fixes hardware decoding support and updates it to FFmpeg 4.0.
2019-07-29 20:34:13 -07:00
Richard Stanway
dd3ed096f8
file-updater: Use transparent HTTP compression 2019-07-17 17:22:09 +02:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000
53615ee10f clang-format: Add clang-format files 2019-06-23 01:53:56 -07:00
Jim
ebb8d6bc28
Merge pull request #1767 from ratwithashotgun/caption-pr1
deps/obs-scripting: Expose obs_output_output_caption_text1 to scripts
2019-04-15 03:30:30 -07:00
James Park
df05f65d63 deps/media-playback: YUV444P support
Use libobs for YUV444P conversion previously handled by FFmpeg. This
ensures the libobs path resists rot.
2019-04-11 23:00:04 -07:00
Rat
eebb8f6597 deps/obs-scripting: Expose obs_output_output_caption_text1 to scripts
Make obs_output_output_caption_text1 usable via scripting if captions
are enabled to make adding additional caption sources easier.
2019-03-21 07:44:44 +01:00
J Lynn
36a6629e6b Add support for building on PPC64LE using x86 Intrinsic Compat Shim 2018-12-17 05:33:16 +11:00
jp9000
b3ef46d986 cmake: Make static VC runtime libraries consistent
Makes Visual C runtime libraries consistent across
Debug/MinSizeRel/Release/RelWithDebInfo, rather than just changing those
flags for RelWithDebInfo.  Also adds /Zl for statically linked
libraries.

Closes obsproject/obs-studio#1421
2018-09-12 07:49:13 -07:00
Shaolin
1b13e12065 cmake: Fix an error when SWIG isn't found
obs-scripting CMakeList.txt expects SWIG, Python3 or Luajit to enable
scripting so in case of not finding just return and don't abort
the configuration
2018-09-09 01:58:11 -03:00
Jim
3be5e414bc
Merge pull request #1362 from Chiitoo/automagic
cmake: Use less automagic during configure
2018-09-05 23:57:07 -07:00
jp9000
28e3604a56 deps: Add json11 library for convenience
Adds a very basic and easy-to-use C++ library strictly for the sake of
convenience when using C++.
2018-07-29 22:15:03 -07:00
Jimi Huotari
eee6541153
deps/obs-scripting: Use less automagic for Lua/Python detection
This adds build-time options for disabling the Lua and/or Python
scripting support in cases where users do not wish to build
it, but have the required libraries installed.
2018-07-11 05:08:47 +03:00
Matthew Szatmary
a8517f3698 libobs: Update libcaption library
(This commit also modifies deps/libcaption)

Closes obsproject/obs-studio#1354
2018-07-08 01:14:27 -07:00
jp9000
a6c65cdbf3 deps/obs-scripting: Prevent python unload more than once 2018-03-18 00:57:15 -07:00
Jim
25e92e5d07
Merge pull request #1237 from kkartaltepe/fix-lua
deps/obs-scripting: Add obs_source_enum_filters
2018-03-17 17:07:12 -07:00
jp9000
0a6d5772d9 deps/obs-scripting: Don't allow unloading more than once 2018-03-17 16:52:14 -07:00
Kurt Kartaltepe
3293282dcf deps/obs-scripting: Add obs_source_enum_filters 2018-03-17 12:11:22 -05:00
Kurt Kartaltepe
65016d5ade
deps/obs-scripting: Fix tick function arg number
Tick function was smashing stack every time it was called due to arg number mismatch.
2018-03-12 10:57:43 -05:00
Exeldro
277b664001 obs-ffmpeg: Add speed percentage option
(Note: This commit also modifies the deps/media-playback module.)

Allows modifying the speed of local file playback.

Closes jp9000/obs-studio#1091
2018-02-15 15:18:13 -08:00
jp9000
dc0363d3e8 deps/media-playback: Use a struct for media init data
Instead of using countless parameters for the media initialization data,
use a structure.
2018-02-15 13:32:35 -08:00
jp9000
c7c5bb999a deps/obs-scripting: Fix cur. script being NULL for script_tick
Fixes a bug where the thread local variable "current_lua_script" is not
set when calling script_tick.
2018-02-01 20:01:46 -08:00
jp9000
a2ae16e98c deps/obs-scripting: Allow NULL script with script_log
(This commit also modifies the frontend-tools module)

Prevents a potential crash when script_log is called by a thread spawned
by a python library.
2018-01-31 16:20:45 -08:00
Colin Edwards
285d9bd6f1 CI: Add rpath info to _obspython 2018-01-30 18:15:44 -06:00
jp9000
dce311cf1a deps/obs-scripting: Make ENABLE_SCRIPTING a user variable
Makes it so that the scripting cmake variable ENABLE_SCRIPTING is a user
variable rather than a global internal cmake variable, and defers the
internal global cmake variable to SCRIPTING_ENABLED instead.
2018-01-23 20:57:48 -08:00
jp9000
c5b58211da deps/obs-scripting: Prevent potential python startup issues
Prevents Python from automatically trying to load from PATH on startup
on windows.  The user should set their Python 3 path themselves.
2018-01-22 07:33:17 -08:00
jp9000
3259269c99 deps/obs-scripting: Fix script_log in python to append newline 2018-01-19 11:10:45 -08:00
jp9000
c9c7dc5748 deps/obs-scripting: Fix frontend API lua table creation
Lua uses 1-based index on table insertions, and lua_newtable has a bit
better performance than lua_createtable if initializing tables with an
unknown item count.
2018-01-18 05:59:20 -08:00
jp9000
d01632a4f0 deps/obs-scripting: Fix a few more VC warnings from swigluarun.h 2018-01-18 05:35:19 -08:00
Colin Edwards
f06c0dd7d5 deps/obs-scripting: Ensure that ffi module gets loaded
Closes jp9000/obs-studio#1158
2018-01-18 01:49:07 -08:00
Jim
8d60404663
Merge pull request #1155 from DDRBoxman/scripting
deps/obs-scripting: Various scripting fixes
2018-01-16 05:24:26 -08:00
jp9000
db2d4c97e8 deps/obs-scripting: Fix installed files/locations on linux
Uses the 'install' command in cmake to install scripting modules/files
(such as _obspython.so, obslua.so, and obspython.py), and changes the
install location of those files on all operating systems.  If using a
non-unix structure install, those files will be installed in
data/obs-scripting/[32bit/64bit], otherwise with unix structure installs
those files will be installed to [/usr/local/lib]/obs-scripting.
2018-01-16 03:55:38 -08:00
Colin Edwards
4390a0e7e6 deps/obs-scripting: Add image-file to lua 2018-01-15 21:54:50 -06:00
Colin Edwards
3714424808 deps/obs-scripting: Set current_lua_script earlier to prevent a crash 2018-01-15 21:12:40 -06:00
Colin Edwards
1b49a0541e deps/obs-scripting: Don't crash obs trying to unload a script that failed to load 2018-01-15 20:38:58 -06:00
jp9000
e7de41fc01 deps/media-playback: Free frame data before freeing frame
Prevents a potential memory leak if data was previously allocated in the
frame.
2018-01-11 20:07:47 -08:00
jp9000
548f3fa9a9 deps/media-playback: Use avcodec_free_context when possible
A bit better handling that should prevent any possible memory leakage
due to any internal data allocated by FFmpeg.
2018-01-11 20:06:21 -08:00
jp9000
2651d076db deps/obs-scripting: Fix swig/python lookup on windows
Fixes swig/python dependencies to search for the pre-compiled deps on
windows.
2018-01-07 17:47:55 -08:00
pkviet
67e48ecc2c libobs/media-io: Replace quad with 4.0
(also obs, deps/media-playback, libobs/audio-monitoring, decklink,
linux-alsa, linux-pulseaudio, mac-capture, obs-ffmpeg, win-dshow,
win-wasapi)

Default channel layout for 4 channels is 4.0 in FFmpeg.
Replacing quad with 4.0 will improve compatibility since FFmpeg has
better support of its default channel layouts.
2018-01-05 09:48:52 -08:00
jp9000
9eabfdbf1e deps/obs-scripting: Add scripting support
Allows Lua/Python scripting support.
2018-01-04 11:37:42 -08:00
jp9000
0497095f97 Fix a number of GCC warnings 2017-12-06 16:42:45 -08:00
jp9000
0d6204c8af Fix a number of MSVC warnings
Fixes a number of warnings with all modules
2017-12-05 13:53:44 -08:00
Ryan Foster
12abbd9205 cmake: Correct CMake checks for LINUX
Some CMake checks were recently switched from UNIX to LINUX to get them
to not apply to macOS/OSX. Since LINUX doesn't seem to be defined,
switch these checks to UNIX AND NOT APPLE.
2017-12-03 19:10:34 -05:00
Colin Edwards
fcea48490f cmake: Do not require X11 on OSX 2017-12-02 22:40:10 -06:00
pkviet
89bc6bdc03 deps/media-playback: Fix compilation with older FFmpeg versions
Fixes an issue where media-playback would not compile with older FFmpeg
versions due to the fact that the AV_PIX_FMT_VIDEOTOOLBOX was
unavailable until version 54.31.100 of libavutil (FFmpeg 2.8).

Fixes mantis issue 1045.

Closes jp9000/obs-studio#1089
2017-12-02 09:09:26 -08:00
pkviet
bbac3280c1 libobs: Add surround sound audio support
(This commit also modifies the following modules: UI,
deps/media-playback, coreaudio-encoder, decklink, linux-alsa,
linux-pulseaudio, mac-capture, obs-ffmpeg, obs-filters, obs-libfdk,
obs-outputs, win-dshow, and win-wasapi)

Adds surround sound audio support to the core, core plugins, and user
interface.

Compatible streaming services: Twitch, FB 360 live
Compatible protocols: rtmp / mpeg-ts tcp udp
Compatible file formats: mkv mp4 ts  (others untested)
Compatible codecs: ffmpeg aac, fdk_aac, CoreAudio aac,
		   opus, vorbis, pcm (others untested).
Tested streaming servers: wowza, nginx
	 HLS, mpeg-dash : surround passthrough
Html5 players tested with live surround:
	 videojs, mediaelement, viblast (hls+dash), hls.js
Decklink: on win32, swap channels order for 5.1 7.1
         (due to different channel mapping on wav, mpeg, ffmpeg)
Audio filters: surround working.
Monitoring: surround working (win macOs linux (pulse-audio)).
VST:	 stereo plugins keep in general only the first two channels.
	 surround plugins should work (e.g. mcfx does).
OS: win, macOs, linux (alsa, pulse-audio).
Misc: larger audio bitrates unlocked to accommodate more channels
NB: mf-aac only supports mono and stereo + 5.1 on win 10
         (not implemented due to lack of usefulness)

Closes jp9000/obs-studio#968
2017-11-26 03:41:53 -08:00
pkviet
d670d7badb libobs: Fix FFmpeg constants
(This commit also modifies the deps/media-playback, obs-ffmpeg, and
win-dshow modules)

More fixes due to ffmpeg renaming some constants and deprecating
AVFMT_RAWPICTURE and AV_PIX_FMT_VDA_VLD.
Latter replaced by AV_PIX_FMT_VIDEOTOOLBOX per ffmpeg dev advice.

Closes jp9000/obs-studio#1061
2017-11-16 21:38:37 -08:00
Richard Stanway
c571ba469b deps/media-playback: Use new ffmpeg constants 2017-10-26 19:16:49 +02:00
Thomas De Schampheleire
379137d039 file-updater: fix crash due to network timeout
If there is no network connection, OBS crashes after 5 minutes idling
with following crash:

*** longjmp causes uninitialized stack frame ***: obs terminated
======= Backtrace: =========
/lib64/libc.so.6(+0x6f1e3)[0x7f8f95f901e3]
/lib64/libc.so.6(__fortify_fail+0x37)[0x7f8f96018ba7]
/lib64/libc.so.6(+0xf7add)[0x7f8f96018add]
/lib64/libc.so.6(__longjmp_chk+0x29)[0x7f8f96018a39]
/usr/lib64/libcurl.so.4(+0xa5d5)[0x7f8f979b75d5]
/lib64/libpthread.so.0(+0x10e30)[0x7f8f962cae30]
/lib64/libc.so.6(__poll+0x2d)[0x7f8f95fff46d]
/usr/lib64/libglib-2.0.so.0(+0x4a64c)[0x7f8f91b5564c]
/usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7f8f91b5575c]
/usr/lib64/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f)[0x7f8f9706c1ff]
/usr/lib64/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xfa)[0x7f8f9701defa]
/usr/lib64/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x9c)[0x7f8f970258fc]
obs(main+0x5ac)[0x4773dc]
/lib64/libc.so.6(__libc_start_main+0xf0)[0x7f8f95f41700]
obs(_start+0x29)[0x478389]

Internet search [1] revealed that this is a libcurl bug that can be worked
around by asking curl not to install signal handlers.

[1] https://stackoverflow.com/a/10755612
2017-10-05 13:57:27 +02:00
jp9000
c9182a9878 obs-ffmpeg: Fix potential seek issues with media source
(This commit also modifies deps/media-playback)

Before, the media-playback library would detect whether something was
seekable by checking the filename for "://", which is unideal because
there are other cases where targets may not be seekable.  So instead, an
explicit "seekable" property (off by default) is now in place in the
media source when not in "local file" mode.  Seeking will only be
enabled if local file mode is on, or if "seekable" is explicitly checked
by the user.

Closes jp9000/obs-studio#1022
2017-09-17 05:55:56 -07:00
jp9000
f4a1ee3658 deps/media-playback: Add concat playback support
Allows using a makeshift playlist file with media playback.
2017-08-03 02:07:58 -07:00
jp9000
81fa5179cd deps/file-updater: Add func to get single remote file 2017-07-31 13:56:20 -07:00
Shaolin
14f734f631 deps/jansson: Update jansson to version 2.9
Closes jp9000/obs-studio#797
2017-06-26 07:28:59 -07:00
jp9000
d5adfff978 deps/media-playback: Fix playback reset fail after stop
The recent changes in 88ae9af causes av_read_frame to check for
m->stopping, and fail with AVERROR_EXIT if true, which would happen
after each reset.  Moving mp_media_prepare_frames to a line after
m->stopping is reset to false fixes the issue.
2017-06-14 08:20:30 -07:00
jp9000
3f5920ae5d deps/media-playback: Fix AV_NOPTS_VALUE being used as timestamp
With certain media files (wmv in particular), the very last frame will
have a timestamp of AV_NOPTS_VALUE.  This could cause the media to stick
on that frame indefinitely.  Instead, use the estimated next timestamp
that was calculated in the previous frame.
2017-06-14 00:43:31 -07:00
jp9000
c1cf44fd91 deps/media-playback: Add timeout when waiting for frames
Media files that have a very low framerate or very long interval between
frames would cause the media playback to stall indefinitely until the
next frame is played.  This adds a 200ms timeout to ensure that the
media can be destroyed without being forced to wait indefinitely for the
next frame.
2017-06-14 00:39:10 -07:00
jp9000
88ae9aff6e deps/media-playback: Fix lockup issues
Certain functions such as avformat_open_input and av_read_frame can
block, causing the program to someone wait very long periods of time
when a network URL is used with the media source.  The
interrupt_callback member variable in AVFormatContext allows safely
canceling IO operations when trying to shut down or stop the
media-playback interface.
2017-06-04 00:44:04 -07:00
jp9000
f0ff1c481d deps/media-playback: Call stop callback on failure 2017-05-29 19:30:14 -07:00