0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
Commit Graph

40561 Commits

Author SHA1 Message Date
wm4
192318a216 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.

(cherry picked from commit d71bbcbc98)
2015-02-21 21:00:50 +09:00
wm4
822e6e0dd1 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.)

(cherry picked from commit 44411674eb)
2015-02-21 20:49:50 +09:00
wm4
45b63c78cd 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.

(cherry picked from commit 2c305d5b29)
2015-02-21 20:49:32 +09:00
wm4
de47273716 stream_file: open pipes non-blocking
Now the player can actually be quit if a pipe was opened, but nobody is
writing to it.

(cherry picked from commit 3c9344a1a9)
2015-02-21 20:49:11 +09:00
wm4
7ace4f2115 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".

(cherry picked from commit 9861abf8ff)
2015-02-21 20:48:43 +09:00
Niklas Haas
f67dfcbec6 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.

(cherry picked from commit 4356e893a1)
2015-02-21 20:48:24 +09:00
wm4
6b9f7923af 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.

(cherry picked from commit 611f9ab0a8)
2015-02-21 20:48:15 +09:00
wm4
c36b1d01c1 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.

(cherry picked from commit b230f32624)
2015-02-21 20:47:55 +09:00
wm4
07222d14f9 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.

(cherry picked from commit 14b231119d)
2015-02-19 19:33:49 +09:00
Diogo Franco (Kovensky)
28fbee7f03 Update RELEASE_NOTES 2015-02-19 13:44:57 +09:00
wm4
b3d2daaa1d 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.

(cherry picked from commit 79006ef66d)
2015-02-19 13:39:39 +09:00
wm4
3437ea23f6 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.

(cherry picked from commit 3f5b5b758d)
2015-02-19 13:39:39 +09:00
wm4
16856994e9 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.

(cherry picked from commit 37a0c9140a)
2015-02-19 13:39:39 +09:00
wm4
c22c440c9c 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.)

(cherry picked from commit ff992e093b)
2015-02-19 13:39:39 +09:00
Jaime Marquínez Ferrándiz
be42f4c212 find_subfiles: Add 'vtt' to subtitle extensions
(cherry picked from commit aa98049877)
2015-02-19 13:39:39 +09:00
wm4
1b5f127cb0 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.

(cherry picked from commit fa9b587426)
2015-02-19 13:39:39 +09:00
wm4
7ea82eb7bc 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.

(cherry picked from commit 082371a160)
2015-02-19 13:39:39 +09:00
wm4
3be989dcd0 demux_edl: make independent from MPContext
(cherry picked from commit d7a4cb14ff)
2015-02-19 13:39:38 +09:00
wm4
0adc8ee5c1 demux_edl: move implementation
Same deal as with demux_cue, and a separate commit for the same reasons.

(cherry picked from commit 1e44c811f3)
2015-02-19 13:39:38 +09:00
wm4
55fe8aab6a demux_cue: make independent from MPContext
Also see previous commit(s).

(cherry picked from commit 10781c2a9c)
2015-02-19 13:39:38 +09:00
wm4
b2aa388f27 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.

(cherry picked from commit 7f03f46882)
2015-02-19 13:39:38 +09:00
wm4
fea1dc0cd5 demux: copy priv pointer too
Weird, but helps with the case a demuxer gets handed its own instance
from outside.

(cherry picked from commit f9872ab26f)
2015-02-19 13:39:38 +09:00
wm4
8161b47e73 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.

(cherry picked from commit edc0007e74)
2015-02-19 13:39:38 +09:00
wm4
f113e03b89 matroska: make timeline code independent of MPContext
(cherry picked from commit 5a186d5942)
2015-02-19 13:39:38 +09:00
wm4
630a7b7d82 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.

(cherry picked from commit a0a089f6a4)
2015-02-19 13:39:38 +09:00
wm4
a4e766a77f demux: chapters without metadata are allowed
Makes some of the following commits slightly simpler. Also fix a typo.

(cherry picked from commit 3efeee446e)
2015-02-19 13:39:38 +09:00
wm4
57deaa02d5 player: use a macro to remove an element from an array
Should be equivalent.

(cherry picked from commit 969edb9e0b)
2015-02-19 13:39:38 +09:00
wm4
a6accfdad7 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.

(cherry picked from commit f54220d951)
2015-02-19 13:39:38 +09:00
wm4
8813fe090d 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.)

(cherry picked from commit 0283815ee1)
2015-02-19 13:39:38 +09:00
wm4
72ba8515d5 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.

(cherry picked from commit a64b1deaa6)
2015-02-19 13:39:38 +09:00
wm4
21f5d82dc5 etc/input.conf: remove a leftover
This is already mapped by default.

(cherry picked from commit 8b784fb1ca)
2015-02-19 13:24:59 +09:00
wm4
8c992458c3 vo_opengl: glsl: remove trailing \
This should be no problem... but it _might_ help with #1536, so it's
worth a try.

(cherry picked from commit 0063d94927)
2015-02-19 13:24:31 +09:00
wm4
40149c017c m_config: log options set by the client API too
(cherry picked from commit d34eabe286)
2015-02-19 13:24:09 +09:00
Diogo Franco (Kovensky)
0c9f10e0d1 Release v0.8.0 2015-02-17 14:06:06 +09:00
Diogo Franco (Kovensky)
5b0d06ca74 Fix typo in RELEASE_NOTES 2015-02-17 14:05:50 +09:00
Diogo Franco (Kovensky)
a410451463 Fix typo on RELEASE_NOTES 2015-02-16 18:54:13 +09:00
Skyrainfit
3152eed6d8 mpv.desktop: Add zh-TW and zh-CN translations
(cherry picked from commit 31ac0574ad)
2015-02-16 18:45:05 +09:00
Diogo Franco (Kovensky)
02260882ce Bump VERSION to v0.8.0_rc3 2015-02-16 18:37:46 +09:00
Diogo Franco (Kovensky)
cd5f0a8612 Update RELEASE_NOTES 2015-02-16 18:37:32 +09:00
wm4
23959eb5b4 osxbundle: config file special case isn't needed anymore
The previous commit effectively fixes the mess caused by 'config' vs.
'mpv.conf', and the hack introduced by commit e01a6dac and extended by
commit db167cd4 isn't needed anymore.

(cherry picked from commit 816d7bba1f)
2015-02-16 18:16:36 +09:00
wm4
21a95f5ed9 player: undeprecate 'config' files
Actually, it's pretty simple to look for multiple filenames at once,
since mp_find_all_config_files() is already a bit "special" anyway.

See #1569. Reverts most of commit db167cd4 (keeps osx-bundle.conf).

(cherry picked from commit a27aa68dd3)
2015-02-16 18:16:28 +09:00
wm4
6dc2a23cda vd_lavc: uninit the hwdec backend after closing the decoder
A recent behavior change in libavcodec's h264 decoder keeps at least 1
surface even after avcodec_flush_buffers() has been called. We used to
flush the decoder in order to make sure all surfaces are free'd, so that
the hw decoder can be safely uninitialized. This doesn't work anymore.

Fix it by closing the AVCodecContext before the hw decoder is
uninitialized. This is actually simpler and more robust. It seems to be
well-supported too.

Fixes invalid read accesses with vaapi-copy and dxva2-copy. These
destroyed the hwdec API fully on uninit, and could not deal with
surfaces surviving the decoder.

Probably fixes #1587.

(cherry picked from commit cf073138b2)
2015-02-16 18:15:20 +09:00
wm4
f94318babc x11: fix uninitialized variable reads
This line of code ended up in the wrong block in commit cd6dfcbe.

(cherry picked from commit f247294d73)
2015-02-16 18:15:05 +09:00
wm4
b476d21d0a client API: clarify filename string encoding
Admittedly, the behavior on Windows is not quite straightforward. The
behavior on the other platforms is equivalent to fopen().

Fixes #1585.

(cherry picked from commit a799a4c57f)
2015-02-16 18:14:10 +09:00
Stefano Pigozzi
16c7de4aab cocoa: remove unused function
(cherry picked from commit bf46f4c997)
2015-02-16 18:13:44 +09:00
Martin Herkt
8fdd688d48 x11: add XK_Cancel to the list of special keys
Some IR receivers emit this key by default for remote control
buttons. Make it mappable.

(cherry picked from commit 9aaec7cffb)
2015-02-16 18:13:36 +09:00
wm4
63304b95a1 Fix build on OSX broken by previous commit
Hopefully.

(cherry picked from commit 5247416735)
2015-02-16 18:13:29 +09:00
Julian
f4263a811f vf_vapoursynth: add display refresh rate property
This value is not necessarily trustworthy (it might change) and can be
0.

(cherry picked from commit 349067a6ab)
2015-02-16 18:13:22 +09:00
wm4
a6bf8e7c36 x11: return a framerate even if no window is mapped
Falls back to the first display in the list returned by xrandr. Not
entirely correct, but makes some people happy (see #1575).

(cherry picked from commit cd6dfcbef4)
2015-02-16 18:13:15 +09:00
wm4
6488e77d8a player: deprecate 'config' files (use mpv.conf), warn against clashes
Apparently there's at least one distro which ships a /etc/mpv/mpv.conf
file (mpv doesn't install such a file). This breaks config files named
'config' located in the user's mpv config directory, because mpv first
loads files named 'config' and then 'mpv.conf'. There is no mechanism
for putting files with different names into the same config path order.
(Even worse, that mpv.conf file only set an option to the default value.
Why do distros always do very stupid things?)

Print a warning on collisions.

Although using 'config' was well-supported, supporting both names is
starting to become messy, so deprecate 'config' and print a warning if
one is found.

At least we will be able to remove the whole mess once 'config' files
are ignored...

This also affects the osx-bundle, which intentionally used these not-so-
optimal semantics. Solve it in a different way. (Unfortunately with an
ifdef - it's not required, but having to explain everyone why mpv tries
to load a osx-bundle.mpv file on Linux and Windows would consume
energy.)

Closes #1569.

(cherry picked from commit db167cd438)
2015-02-16 18:13:01 +09:00