Commit Graph

40592 Commits

Author SHA1 Message Date
Stefano Pigozzi 0466ce2f98 build: print pkg-config query on failure 2015-02-21 20:25:50 +01:00
wm4 076037531f build: slightly improve libass version number test failure message 2015-02-21 17:39:48 +01:00
wm4 af435e0a02 manpage: ipc: add a socat example
Requested, and should be quite good at giving an overview how it works.
2015-02-21 16:26:37 +01:00
wm4 d71bbcbc98 video: un-discourage "vaapi-copy" hwdec mode
Maybe I don't know what I'm doing. I'm fairly certain though that Intel
does not know what they're doing.
2015-02-20 22:24:37 +01:00
wm4 ee653b8a26 demux: timeline: honor quit requests 2015-02-20 22:08:02 +01:00
wm4 1cac7d1a65 demux: add a demux_open_url() function
Often stream and a demuxer are opened at the same time. Provide a
function for this and replace most of its uses.
2015-02-20 21:56:55 +01:00
wm4 6aa6778ac4 demux: change demux_open() signature
Fold the relatively obscure force_format parameter into demuxer_params.
2015-02-20 21:21:14 +01:00
wm4 6c1355be96 demux: add free_demuxer_and_stream() function
Although their lifetimes are conceptually different, it happens often
that a demuxer is destroyed together with its stream.
2015-02-20 21:08:10 +01:00
wm4 44411674eb player: move timeline scanning (ordered chapters etc.) to a thread
Do timeline building (scanning & opening reference files for ordered
chapters, and more) in a thread. As a result, this process can actually
be stopped without having to kill the player.

This is pretty simple: just reuse the demuxer opening thread. We have
to give up on the idea that open_demux_reentrant() is reusable, though.

(Althoughthe timeline readers still need some fixes before they react to
the quit request.)
2015-02-20 20:30:05 +01:00
wm4 2c305d5b29 player: cosmetics: async/non-blocking -> reentrant
These functions do blocking work on a separate thread, but wait until
they return. So they are not async or non-blocking. But they do react to
user-input and client API accesses, which makes them reentrant.
2015-02-20 20:06:43 +01:00
wm4 3c9344a1a9 stream_file: open pipes non-blocking
Now the player can actually be quit if a pipe was opened, but nobody is
writing to it.
2015-02-20 20:01:01 +01:00
wm4 d5addec147 x11egl: minor cleanup
Not like it matters, and is probably still not entirely correct.
2015-02-20 19:54:33 +01:00
wm4 9861abf8ff vo_opengl: minor robustness improvement in function loader
Check the scanf() return value, and don't continue if it doesn't find
both numbers (can happen with GLES 1.0). Also, some implementations can
return NULL from glGetString() if something is "broken".
2015-02-20 18:53:35 +01:00
Niklas Haas 885c2fff70 vo_opengl: add ginseng upscaler
This is a variation of ewa_lanczos that is sinc-windowed instead of
jinc-windowed. Results are pretty similar, but the logic is simpler.
This could potentially replace the ugly ewa_lanczos code.

It's hard to tell, but from comparing stills I think this one has
slightly less ringing than regular ewa_lanczos.
2015-02-20 16:21:46 +01:00
Niklas Haas 4356e893a1 vo_opengl: fix smoothmotion coefficient calculation, for real this time
I've reworked pretty much all the logic to correspond to what the theory
actually describes. With this commit, playback is wonderfully smooth on
my machine.
2015-02-20 15:06:35 +01:00
wm4 611f9ab0a8 demux_lavf: apply hacks even if format is forced
Some of the hacks were not applied if the file format was forced. Commit
37a0c914 moved them to a table, which is checked with normal probing
only.

Fixes #1612 (DVD forces mpeg, which in turn has to export native stream
IDs specifically).

Do some code restructuring on the way. For example, the probescore can
simply be set to the correct initial value, instead of checking whether
it was set at all.
2015-02-20 14:29:56 +01:00
wm4 b230f32624 manpage: fix vf_scale arnd parameter
It probably was always a flag, so the documentation became invalid as
soon as mpv stopped accepting 0/1 for flags.

Fixes #1608.
2015-02-19 19:06:46 +01:00
wm4 14b231119d build: fix Python 3 unicode issue with waf 1.8.6
Starting with waf 1.8.6 (in Python 3), the hcode variable isn't a
string, but a byte string.

This commit adds the solution proposed in the upstream waf bug report:
https://code.google.com/p/waf/issues/detail?id=1535

It seems a bit overly verbose, but on the other hand, this solution has
the chance of being most correct/compatible.

Fixes #1604.
2015-02-19 09:40:50 +01:00
wm4 a34d331841 travis: update libass dep
Use a libass version that does not fail; switch to github releases.
2015-02-18 21:37:55 +01:00
wm4 c314385280 build: require recent libass
Nobody should use an older version. It's perfectly backwards and forward
compatible, so distros have no excuse not to package a recent version.
Older versions lack tons of bug fixes (some of them crashing bugs, and
potentially security relevant).

With love to Debian, which is still on 0.10.2.
2015-02-18 21:13:11 +01:00
wm4 79006ef66d demux_lavf: blacklist bintext files
Whatever the hell that is. FFmpeg tries to open any files with .bin file
extension with this demuxer (unless it finds a better demuxer), and then
reads the whole damn file, along with spamming dumb crap.
2015-02-18 21:13:11 +01:00
wm4 3f5b5b758d cache: silence "EOF reached" message
This message will be printed relatively often once EOF is reached. In
some cases this is rather annoying, for example when playing HLS. (With
HLS, the stream is just a playlist file, while libavformat opens actual
media files without mpv's knowledge, so the cache is completely useless
and hits EOF instantly.)

That it retries reading is apparently a good thing: at least local files
can grow, and even after the player got the EOF, playback _could_ be
resumed by basically polling and detecting that there is more data. So
I'm not changing this behavior yet.
2015-02-18 21:13:11 +01:00
wm4 102946ee03 player: enable cache and demuxer thread for subtitles too
Includes some logic for not starting the demuxer thread for fully read
subtitles. (Well, the cache will still waste _lots_ of resources, and
the cache always has to be created, because we don't know whether it'll
be needed _before_ opening the file.)

See #1597.
2015-02-18 21:12:57 +01:00
wm4 37a0c9140a demux_lavf: reorganize hacks
An attempt to make format-specifics more declarative. (In my opinion,
all of this should be either provided by libavformat, or should not be
needed.)

I'm still leaving many checks with matches_avinputformat_name(), because
they're so specific.

Also useful for the following commit.
2015-02-18 21:12:57 +01:00
wm4 c7f450723f player: allow unsetting --term/osd-playing-msg
Treat an empty string as unset. The fact that the option values can be
NULL is merely weirdness due to how the option parser works (it
unfortunately doesn't initialize string fields to non-NULL).
2015-02-18 21:12:57 +01:00
wm4 ff992e093b demux_lavf: set interrupt_callback
Helps with terminating the stream if e.g. HLS streams are stuck. (For
other demuxers, the stream's interrupt callback already takes care of
this.)
2015-02-18 21:12:57 +01:00
wm4 69e6e7b17c input: minor cleanup
Add MP_KEY_MOUSE_ENTER to the ignored input if the user has disabled
mouse input. Remove one instance of code duplication, and add a
MP_KEY_IS_MOUSE_MOVE macro to summarize events that are caused by moving
the mouse.
2015-02-18 21:12:57 +01:00
Jaime Marquínez Ferrándiz aa98049877 find_subfiles: Add 'vtt' to subtitle extensions 2015-02-18 21:12:55 +01:00
torque 3b269ac0a0 input: add MOUSE_ENTER keybinding.
Signed-off-by: wm4 <wm4@nowhere>
2015-02-18 00:03:16 +01:00
wm4 fa9b587426 demux, matroska: remove demuxer type field
The Matroska timeline code was the only thing which still used the
demuxer.type field. This field explicitly identifies a demuxer
implementation. The purpose of the Matroska timeline code was to reject
files that are not Matroska. But it already forces the Matroska format,
meaning loading will explicitly only use the Matroska demuxer. If the
demuxer can't open the file, no other demuxer will be tried, and thus
checking the field is redundant.

The change in demux_mkv_timeline.c removes the if condition, and
unindents the if body.
2015-02-17 23:58:18 +01:00
wm4 082371a160 demux: remove file_contents field
Only demux_cue and demux_edl used it. It's a weird field and doesn't
help with anything anymore - by now, it only saves a priv context in the
mentioned demuxers. Reducing the number of confusing things the demuxer
struct has is more important than minimizing the code.
2015-02-17 23:49:38 +01:00
wm4 d7a4cb14ff demux_edl: make independent from MPContext 2015-02-17 23:48:47 +01:00
wm4 1e44c811f3 demux_edl: move implementation
Same deal as with demux_cue, and a separate commit for the same reasons.
2015-02-17 23:48:39 +01:00
wm4 10781c2a9c demux_cue: make independent from MPContext
Also see previous commit(s).
2015-02-17 23:48:07 +01:00
wm4 7f03f46882 demux_cue: move implementation
Move the implementation, of which most was in tl_cue.c, to demux_cue.c.
Currently, this is illogical, because tl_cue.c still accesses MPContext.
This is going to change, and then it will be better if everything is in
demux_cue.c. This is only a separate commit to distinguish code movement
and actual work; the next commit will do the actual work.
2015-02-17 23:48:03 +01:00
wm4 f9872ab26f demux: copy priv pointer too
Weird, but helps with the case a demuxer gets handed its own instance
from outside.
2015-02-17 23:47:54 +01:00
wm4 edc0007e74 matroska: move timeline code to demux/
Separate from previous commit, because git is bad at tracking file
renames when the file contents are also changed.
2015-02-17 23:47:37 +01:00
wm4 5a186d5942 matroska: make timeline code independent of MPContext 2015-02-17 23:46:50 +01:00
wm4 a0a089f6a4 player: use a separate context for timeline loader stuff
Instead of accessing MPContext in player/timeline/*, create a separate
context struct, which the timeline loaders fill out. It turns out that
there's not much in the way too big MPContext that these need to access.

One major PITA is managing (and closing) the set of open demuxers. The
problem is that we need a list of all demuxers to make sure no unneeded
streams are enabled.

This adds a callback to the demuxer_desc struct, with the intention of
leaving to to the demuxer to call the right loader, instead of
explicitly checking the demuxer type and dispatching manually in common
code. I also considered making the timeline part of the demuxer state,
but decided against: it's too much of a mess wrt. memory management and
threading, and also doesn't make it clear who owns the child demuxers.
With the struct timeline decoupled from the demuxer state, it's at least
somewhat clear that the child demuxers are independent from the "main"
demuxer.

The actual changes to player/timeline/* are separated in the following
commits, because they're quite verbose. Some artifacts will be removed
later as soon as there's only 1 timeline loading mechanism.
2015-02-17 23:46:12 +01:00
wm4 3efeee446e demux: chapters without metadata are allowed
Makes some of the following commits slightly simpler. Also fix a typo.
2015-02-17 23:44:31 +01:00
wm4 969edb9e0b player: use a macro to remove an element from an array
Should be equivalent.
2015-02-17 23:43:43 +01:00
wm4 f54220d951 player: actually close files when using sub_remove
Also effects some other cases.

The real reason for this is for keeping track of which demuxers can be
closed (see following commit). Since I don't want to use reference
counting for this, some sort of simplistic mark-and-sweep is done to
determine whether a demuxer is still needed.
2015-02-17 23:43:13 +01:00
wm4 0283815ee1 DOCS/client-api-changes: mark 0.8.0 release
(There was a missing version bump for the msg-level change; just move it
under 1.14.)
2015-02-17 23:42:25 +01:00
wm4 a64b1deaa6 demux_lavf: hack against hls showing "100%" position
The HLs protocol consists of a "playlist" main file, which mpv downloads
and passes to the HLS demuxer. The HLS demuxer actually requests segment
files containing media data on its own. The packets read from the
demuxer have a source file position set, but it's not from the main
file. This leads to a strange effect: as a last fallback, the player
will calculate the approximate playback position from the file
position/size ratio, and since the main file is tiny, this will always
show 100%. Fix this by resetting the packet file position.

This doesn't affect the case when HLS actually reports a duration.
2015-02-17 23:42:04 +01:00
wm4 d26ba961d0 command: add rescan_external_files
Requested.

Hopefully will be useful for things that download and add external
subtitles on demand. Or something.

Closes #1586.
2015-02-16 22:08:16 +01:00
wm4 37183532ae command: nicer OSD message when setting audio-device
Requested.
2015-02-16 21:35:13 +01:00
wm4 8b784fb1ca etc/input.conf: remove a leftover
This is already mapped by default.
2015-02-16 21:16:14 +01:00
wm4 0063d94927 vo_opengl: glsl: remove trailing \
This should be no problem... but it _might_ help with #1536, so it's
worth a try.
2015-02-16 21:00:03 +01:00
wm4 6e50e59386 vf_vapoursynth: replace a hack with a newer VS API function
The new function does exactly what we need. Replaces the old hack, which
created the vscore by running an empty script.
2015-02-16 20:56:00 +01:00
wm4 d34eabe286 m_config: log options set by the client API too 2015-02-16 20:04:31 +01:00