Commit Graph

42056 Commits

Author SHA1 Message Date
wm4 1ec1b4186c vd_lavc: bump number of allocated surfaces for hwdec with HEVC 2015-08-24 23:02:40 +02:00
wm4 2172c22ee3 vaapi: add HEVC profile entries
libavcodec does not support HEVC via VAAPI yet, so this won't work.
However, there is ongoing work to add HEVC support to VAAPI, and this
change might help with testing. (Or maybe not - but there is no harm in
this change.)
2015-08-24 23:00:45 +02:00
wm4 a48a8a746e demux_libarchive: don't allow probing to read unlimited data
Instead, allow reading 2KB only. This seems to be sufficient for
libarchive to recognize zip, 7z, rar, tar. Good enough.

This is implemented by creating an in-memory stream with a copy of
the file header. If libarchive succeeds opening this, the actual
stream is opened.

Allowing unlimited reading could break unseekable streams, such as
playing from http servers with no range request support or pipes.

Also, we try not to read too much data in the first probe pass. Some
slow network streams like shoutcast services could make probing much
slower if we allow it to read too much. In the second probing pass,
actually allow 200KB.
2015-08-24 22:26:07 +02:00
wm4 3bbcbc15a5 vda, videotoolbox: guard against unexpected pixel format
Should not happen, but since we don't control decoder video surface
allocation, anything could happen, and the code should be able to deal
with it. Untested.
2015-08-23 21:41:54 +02:00
wm4 63dc0085c8 audio: don't sleep when finishing audio resync
This should avoid unnecessary sleeping when audio playback start resync
has finished and goes into the normal playback state.

This is tricky; see e.g. commit 402fe381.
2015-08-23 21:41:09 +02:00
wm4 fb5368b159 vda, videotoolbox: fix broken condition in screenshot code
Fixes #2237.
2015-08-23 11:32:49 +02:00
wm4 5c3196d20b stream_libarchive: read tar only in "unsafe" mode
As expected, probing with libarchive is a disaster. Both libavformat and
libarchive are too eager to misdetect file formats just because files
"might" be of a specific type. In this case, it's mp3 vs. tar. To be
fair, neither file format has an actual header. I'm not sure why we'd
need tar support, but since libarchive provides it, and idiots on the
internet apparently pack media files in tar sometimes (really, idiots),
keep it for now, and probe tar last.
2015-08-22 22:13:20 +02:00
wm4 602105dbda player: add --playlist-pos option
Oddly often requested.
2015-08-22 22:08:17 +02:00
wm4 1e4113040c vo_opengl: remove dead code
Leftover from 3245bfef.
2015-08-22 21:05:32 +02:00
Ellis Berner 0e2024ef2b docs: correct typo for 'ingore-chmap'
ingore-chmap -> ignore-chmap
2015-08-22 11:50:33 +02:00
wm4 8565073f68 command: make the playback-time property writable
Provides a simplistic way to seek without having to care about weird
situations like timestamp vs. playback time. This is good, because the
seek command is currently timestamp based, so when using the seek
command the user _does_ have to care.
2015-08-21 15:53:24 +02:00
wm4 2e3ce738f5 player: return better guess for playback time during seeks
Always compute the estimated absolute time of the seek target, and
display this as playback time during seeks.

Improves behavior with e.g. .ts files, for which we try to avoid seeks
by timestamp.
2015-08-21 15:37:07 +02:00
Stian Eikeland 8a9fc9398d options: sub-file replaces subfile, instead of sub 2015-08-21 00:15:24 +02:00
Jari Vetoniemi d29e699491 gl_wayland: Wait for frame callbacks
Keep glSwapInterval(0) on to avoid blocking on gl calls, but wait for
frame callbacks so we play nice with compositor.
2015-08-21 00:01:01 +02:00
Jari Vetoniemi e05dc7bfb7 vo_wayland: Wait for frame callbacks
Privdes small api for vo_wayland where one can request frame callback
and then wait for it.

This will make vo_wayland play video smoothly.
2015-08-21 00:01:01 +02:00
Jari Vetoniemi 3245bfefc3 gl_wayland: eglSwapInterval(0) to avoid blocking
This makes mesa not wait for frame callback internally.
2015-08-21 00:01:01 +02:00
Ricardo Constantino b144da63a8 TOOLS/lua/autoload: fix adding more files at end of auto-playlist
Fixes regression in dfd8a5f that made autoload not add more files
at the end of the current playlist if playlist was made by the
script.

This still prevents loading the script if more than one (media or
playlist) file was manually added.
2015-08-20 22:05:03 +02:00
wm4 9cd929bf79 TOOLS/lua/autoload: add all files on start
Or almost. I don't know or care.

Fixes #2219 (maybe, I don't know or care).
2015-08-20 22:04:36 +02:00
wm4 addbf8faae stream_libarchive: disable raw filter
Too many false positives (it accepts things like unspecific text files),
and also relatively useless.
2015-08-20 21:56:44 +02:00
Niklas Haas e1fd80097c vo_opengl: add tscale-clamp option
This significantly reduces the amount of noticeable flashing when using
tscale kernels with negative lobes, by cutting them off completely.

I'm not sure if this has any negative effects. It needs a bit of
subjective testing over a period of time, so I just made it an option.

Fixes #2155.
2015-08-20 21:55:19 +02:00
wm4 96648169e3 vo_rpi: disable background by default
And add an option to enable it.
2015-08-20 19:07:18 +02:00
wm4 147f4956d3 player: deliver IDLE event after uninitializing state
A client API user might count on the fact that audio and video outputs
have already been uninitialized. (They remain uninitialized before
entering idle mode in order to allow smooth transition to the next
playlist entry.) Since event delivery is asynchronous, this has to
happen after actually doing the uninitialization, or the client will
essentially run into a race condition.
2015-08-20 15:25:32 +02:00
wm4 895c8801a2 gl_rpi: destroy the EGLSurface too
Most likely doesn't matter much.
2015-08-20 15:21:01 +02:00
wm4 0d5541af47 vo_rpi: use correct variable for osd layer
This is a cosmetic change, because the value is exactly the same. (The
old code just duplicates the logic, sort of.)
2015-08-20 15:20:20 +02:00
wm4 1b93a7a895 stream_libarchive: fix libarchive callback signature
libarchive uses a quite confusing ifdeffery mess for some of the types
used in callbacks. Currently, archive_read_set_seek_callback() causes a
warning at least on Windows due to mismatching return type. The header
file uses __LA_INT64_T as return type, so I think the user is intended
to use int64_t.

(The ssize_t return type for the read_cb seems correct, on the other
hand.)
2015-08-20 11:08:22 +02:00
wm4 b8fe17f2e6 vo_rpi: fix blackscreen before the first subtitle/OSD is rendered
The OSD overlay wasn't initialized, so it remained solid black until the
first time a subtitle line or an OSD element became visible.
2015-08-20 10:36:32 +02:00
wm4 3bceb37b06 old-configure: avoid a warning 2015-08-19 21:38:47 +02:00
wm4 bffd78748f vd_lavc: remove unneeded hwdec parameters
All hwdec backends now use a single pixel format, and the format is
always checked.

Also, the init_decoder callback is now mandatory.
2015-08-19 21:33:18 +02:00
wm4 cab1f6439c video: don't decode 2 frames ahead with display-sync
This is not needed. It was used only temporarily in a development
branch, and is a leftover from earlier rebasing.
2015-08-19 21:24:56 +02:00
Stefano Pigozzi d0e19b659e build: make sure the HAVE_ key is undefined on failure
Some particular checks can define the HAVE_ key on their own. To make sure
they work correctly when composed (with compose_checks) we force the HAVE_
key to be undefined if a check fails.
2015-08-19 00:15:41 +02:00
Stefano Pigozzi 2dac2efce4 Revert "build: workaround for broken waf crap"
This reverts commit 1b7883a3e5.
2015-08-19 00:12:33 +02:00
wm4 1b7883a3e5 build: workaround for broken waf crap
Even though the rpi check fails, it'll define "HAVE_RPI 1" in config.h.
Why? Who knows...
2015-08-18 23:57:00 +02:00
wm4 4427fa9900 stream_libarchive: restrict number of allowed formats
Most of what is not in this list is extremely obscure, or increases the
file format misdetection rate.
2015-08-18 23:26:40 +02:00
wm4 594071dbf4 manpage: fix typo
Actually, this was unintentionally changed in commit 70e0bc1e.
2015-08-18 23:11:11 +02:00
wm4 5eb6466e54 vo_rpi: redraw subtitles only on change
Since vo_rpi uses MMAL for video output, which is completely
independent from the GLES overlay, we can just not redraw the
GLES screen if subtitles do not change.

(As a furhter optimization, the dispmanx overlay could be removed
if nothing is visible. But I'm not sure if adding and removing the
overlay frequently is a good idea for performance, so this could
just as well go the other way.)
2015-08-18 23:09:37 +02:00
wm4 58ba2a9087 vo_rpi: use EGL to render subtitles
Slightly faster than using the dispmanx mess (perhaps to a large amount
due to the rather stupid C-only unoptimized ASS->RGBA blending code).

Do this by reusing vo_opengl's subtitle renderer, and vo_opengl's RPI
backend.
2015-08-18 23:01:09 +02:00
wm4 c36c596b7b rpi: factor out context creation
To be used by vo_rpi.c. No functional changes.
2015-08-18 23:00:51 +02:00
wm4 da8a9ff589 demux_libarchive: reject 0-sized files
libarchive does strange things with them.
2015-08-18 00:14:37 +02:00
wm4 cf2fa9d3e5 stream: provide a stream_get_size() convenience function
And use it everywhere, instead of retrieving the size manually. Slight
simplification.
2015-08-18 00:10:54 +02:00
wm4 bf5eac8dd3 demux_libarchive: open flat compressed files
Things like .gz etc., which have no real file header. A mixed bag,
because it e.g. tends to misdetect mp3 files as compressed files or
something (of course it has no mp3 support - I don't know as what it
detects them). But requested by someone (or maybe not, I'm not sure
how to interpret that).
2015-08-17 23:59:55 +02:00
wm4 41d7989800 DOCS/client_api_examples/sdl: don't curse the mainloop
Fix a typo, and also reword another comment.
2015-08-17 23:56:56 +02:00
wm4 6894858bf2 video: fix VideoToolbox/VDA autodetection
This affects vo_opengl_cb in particular: it'll most likely auto-load
VDA, and then the VideoToolbox decoder won't work. And everything fails.

This is mainly caused by FFmpeg using separate pixfmts for the _same_
thing (CVPixelBuffers), simply because libavcodec's architecture demands
that hwaccel backends are selected by pixfmts. (Which makes no sense,
but now we have the mess.)

So instead of duplicating FFmpeg's misdesign, just change the format to
our own canonical one on the image output by the decoder. Now the GL
interop code is exactly the same for VDA and VT, and we use the VT name
only.
2015-08-17 23:51:31 +02:00
wm4 2b280f4522 stream: libarchive wrapper for reading compressed archives
This works similar to the existing .rar support, but uses libarchive.
libarchive supports a number of formats, including zip and (most of)
rar.

Unfortunately, seeking does not work too well. Most libarchive readers
do not support seeking, so it's emulated by skipping data until the
target position. On backwards seek, the file is reopened. This works
fine on a local machine (and if the file is not too large), but will
perform not so well over network connection.

This is disabled by default for now. One reason is that we try
libarchive on every file we open, before trying libavformat, and I'm not
sure if I trust libarchive that much yet. Another reason is that this
breaks multivolume rar support. While libarchive supports seeking in
rar, and (probably) supports multivolume archive, our support of
libarchive (probably) does not. I don't care about multivolume rar, but
vocal users do.
2015-08-17 00:55:26 +02:00
wm4 00b60710cf player: actually close files on playback end
Regression since commit 75b1d504.
2015-08-15 16:26:02 +02:00
wm4 a6e33b4290 vo_rpi: fix NULL pointer deref
Can happen in obscure situations and with hw decoding disabled.
2015-08-14 13:20:00 +02:00
wm4 70c990cda5 atomics: cleanup HAVE_ATOMICS define
The waf build system generates this already. No point in redoing it in
the header file.

The legacy build system (which we really should drop) didn't; fix it.
2015-08-13 23:34:14 +02:00
wm4 baeead7181 vo_rpi: simplify background handling
Apparently this is sufficient.
2015-08-13 17:25:15 +02:00
wm4 a6a585d470 vo_rpi: unregister vsync callback
Small bug, much pain.
2015-08-13 17:23:31 +02:00
wm4 0ba44d5fef vo_rpi: skip OSD rendering when repeating frames
It's unnecessary and slow. Doesn't help too much, though.
2015-08-13 12:23:18 +02:00
wm4 ed09e78fb9 DOCS/client_api_examples/sdl: add more explanation comments 2015-08-12 23:04:26 +02:00