Commit Graph

46571 Commits

Author SHA1 Message Date
Martin Herkt dee7cdfae7
ci: enable libsmbclient 2018-07-05 16:03:32 +02:00
Martin Herkt 861c10268d
ci: switch Travis env language to generic
This way it doesn’t override CC.
2018-06-25 23:30:22 +02:00
Martin Herkt 802f594a85
ci: add more build targets
Travis now builds with Clang and containers with git snapshots
of some dependencies.
2018-06-25 23:24:30 +02:00
Martin Herkt 7428272f93
ci: Use custom container for Travis builds
Temporary solution. For now, this builds using a container image
based on openSUSE Tumbleweed with the current FFmpeg release.
More containers will be added (at least with git snapshots of FFmpeg
and libass), and Travis will eventually be replaced with something
we have more control over.
2018-06-25 19:16:42 +02:00
Andreas Wennerberg 4a0fcdfbd8 TOOLS/autoload: Fixed broken "disabled" option
`--script-opts=autoload-disabled=yes` now
properly stops the script from running.
2018-06-23 13:23:07 +01:00
Nicolas F 4d1269d9db demux_mkv: add A_MLP to mkv_audio_tags
Fixes #5923
2018-06-22 21:17:26 +03:00
Martin Herkt afe713c71c
build: add static libraries to libmpv.pc 2018-06-20 10:42:39 +02:00
Akemi cd893626cb cocoa-cb: fix building with Swift 4.2
init is a reserved keyword and Swift 4.2 got a bit stricter about using
it. this could be fixed by adding apostrophes around init but makes the
code uglier. hence i just renamed init to initialized and for
consistency uninit to uninitialized.

Fixes #5899
2018-06-12 01:57:34 +03:00
Akemi 2e7a4f717c build: manually add standard library search paths for linking
this reverts commit a174566 since the actually reason for failing has
been found. the isysroot flag overwrites the framework and library
search paths. though we only need to overwrite the former and there is
no way to just overwrite that one. we manually add the standard library
search paths to the very end of the linking command, so it won't
interfere with the search paths extracted by waf.

Fixes #5791
2018-06-12 01:54:45 +03:00
Akemi 5865086aa8 cocoa-cb: remove pre-allocation of window, view and layer
the pre-allocation was needed because the layer allocated a opengl
context async itself and we couldn't influence that. so we had to start
the core after the context was actually allocated. furthermore a window,
view and layer hierarchy had to be created so the layer would create
a context.
now, instead of relying on the layer to create a context we do this
manually and re-use that context later when the layer wants to create
one async itself.
2018-06-12 01:51:01 +03:00
Akemi 20dffe0621 vo_libmpv: pass vo struct to the control callback 2018-06-12 01:51:01 +03:00
Stephen Hutchinson f66ee85fdf options.c: display additional metadata tags during video playback
The currently-displayed tags make sense for music files, but similar
information for video is more commonly - or at least should be - put
under other tags, while the audio-related tags are often used for
other information on video files (particularly with youtube-dl's
output).
2018-06-11 20:33:12 +03:00
Julian 4d2b865088 stats: remove superfluous line breaks
Those accidentally slipped in with 9975835bde
due to bad copy & paste.
2018-06-09 01:02:34 +03:00
Anton Kindestam 157b242289 hwdec_drmprime_drm: Do not show error message during probing
Change the log-level of an error message that would sometimes show up
during hwdec probing, and could be misleading.
2018-06-08 22:13:39 +03:00
gall0ws bca59516cc stream_file: enable cache for FUSE filesystems on OpenBSD and FreeBSD 2018-06-05 01:28:35 +03:00
fatalis 8479449d14 osc: fix accidentally skipping files when seeking with slider
When seeking near the end of the file and the next file loads, seeking
continues on the next file at the same position and then immediately
the file after that. This patch stops slider seeking when a new file is
loaded, which is the standard behavior of many other players.
2018-06-04 00:14:59 +03:00
Jan Ekström 36cc33ff5a ao_alsa: simplify get_space() 2018-06-04 00:03:11 +03:00
Muhammad Faiz 945303a92e ao_alsa: replace snd_pcm_status() with snd_pcm_avail() in get_space()
Fixes a bug with alsa dmix on Fedora 29. After several minutes,
audio suddenly becomes bad and muted.

Actually, I don't know what causes this. Probably this is a bug in alsa.
In any case, as snd_pcm_status() returns not only 'avail', but also other
fields such as tstamp, htstamp, etc, this could be considered a good
simplification, as only avail is required for this function.
2018-06-04 00:00:57 +03:00
sfan5 7f625ea29b vo_sdl: add support for screensaver VOCTRL's
Previously vo_sdl would unconditonally disable the screensaver,
ignoring the `stop-screensaver` option.
2018-06-02 23:34:38 +03:00
Niklas Haas 5056777b86 vo_gpu: desaturate after peak detection
This sacrifices some dynamic range for well-behaved sources, but
prevents catastrophic desaturation on badly mastered / too bright
sources. I think that's the better trade-off. This makes the
desaturation algorithm much "safer" to deploy by default, as well. One
could even argue going up to strength 1.0, which works better for some
sources but worse for others. But I think the current strength is the
best trade-off even after this change.
2018-05-31 03:13:50 +03:00
wm4 cb52cfae1a player: fix coding style
I'm also not sure whether this condition doesn't subtly break a lot of
things.
2018-05-31 01:24:51 +03:00
wm4 31bce1cbe7 demux_lavf: drop obscure genpts option
This code shouldn't even exist in libavformat. If you still need it, you
can enable it via --demuxer-lavf-o.
2018-05-31 01:24:51 +03:00
wm4 ca97239cb6 options: add --http-proxy
Often requested, trivial.
2018-05-31 01:24:51 +03:00
wm4 935846fc40 player: remove deprecated vo/ao auto profiles
These were deprecated almost 2 years ago. Now they happen to be in the
way.
2018-05-31 01:24:51 +03:00
wm4 45f8d767b9 m_config: remove outdated comment 2018-05-31 01:24:51 +03:00
wm4 b13bb9fbdd m_config: check for int16_t offset overflow
For some reason shadow_offset is a int16_t variable (to save some space
or something), which means the static part of the entire option list
must be below 32KB. This is fine, but still add a check against
overflows. (Currently it's 3.6KB. This does not include dynamic
allocations like strings.)
2018-05-31 01:24:51 +03:00
wm4 7d5133b713 m_config: remove an unused function 2018-05-31 01:24:51 +03:00
wm4 f022bf61a9 m_option: remove an unused field 2018-05-31 01:24:51 +03:00
wm4 b50d54ed40 m_config: cosmetics: fix 2 typos 2018-05-31 01:24:51 +03:00
wm4 3ca9598d5c manpage: update --demuxer-thread option
Be a bit more detailed, and discourage disabling it.
2018-05-31 01:24:51 +03:00
wm4 9428294634 player: simplify edition switching
The player fully restarts playback when the edition or disk title is
changed. Before this, the player tried to reinitialized playback
partially. For example, it did not print a new "Playing: <file>"
message, and did not send playback end to libmpv users (scripts or
applications).

This playback restart code was a bit messy and could have unforeseen
interactions with various state. There have been bugs before. Since it's
a mostly cosmetic thing for an obscure feature, just change it to a full
restart. This works well, though since it may have consequences for
scripts or client API users, mention it in interface-changes.rst.
2018-05-31 01:24:51 +03:00
wm4 36099d27f8 cmd: do not use a random value for MP_CMD_OPT_ARG
This flag is used only by the command parser. Its value overlapped with
some of the existing m_option flags, but only flags that did not matter
for the command parser (i.e. the flag bits used had mostly private uses
in each component). It's still a bit unclean and dangerous to use an
essentially random value, so reuse M_OPT_OPTIONAL_PARAM for it.

Since M_OPT_OPTIONAL_PARAM has a slightly longer name than
MP_CMD_OPT_ARG, I'm going to keep the old name.
2018-05-25 11:13:44 +02:00
wm4 9fe4e10c7d player: use canonical playback time for video refreshes
When changing video filters during initialization, there was a small
time window where video was initialized, but playback restart was not
complete yet. In this time window, playback_pts is not set. But since
issue_refresh_seek() was using this, it could lead to no refresh being
done _if_ the "video" had only 1 frame (such as cover art).

Fix this by using get_current_time() instead, which is the current time
with corner cases such as ongoing loading or seeks taken into account.

See also the previous commit. Without that, get_current_time() could
return NOPTS during init.

Fixes #5831.
2018-05-25 10:53:47 +02:00
wm4 a832624af9 manpage: mention that fd:// file descriptors may be modified
For example, we call setmode() to switch a FD from text to binary mode
on garbage OSes.
2018-05-25 10:53:41 +02:00
wm4 5a4a69cb58 stream_file: properly detect stdin as pipe
There is some code that checks a FD for whether it is a regular file or
not. If it's not a regular file, it e.g. enables use of poll() to avoid
blocking forever.

But this was done only for FDs that were open()ed by us, not from stdin
special handling or fd://. Consequently, " | mpv -" could block the
player. Fix this by moving the code and running for it on all FDs.

Also, set p->regular_file even on mingw.
2018-05-25 10:47:46 +02:00
wm4 fba98cfb05 manpage: remove a reference to a removed option 2018-05-25 10:47:23 +02:00
wm4 4e750e31a1 demux: fix/improve aspects of EOF signaling
When the current packet queue was completely empty, and EOF was reached,
the queue->is_eof flag was not correctly set to true. Change this by
reading ds->eof to check whether the stream is considered EOF. We also
need to make sure update_seek_ranges() is called in this case, so change
the code to simply call it when queue->is_eof changes.

Also, read_packet() needs to call adjust_seek_range_on_packet() if
ds->eof changes. In that case, the decoder also needs to be notified
about EOF. So both of these should be called when ds->eof changes to
true. (Other code outside of this function deals with the case when
ds->eof is changed to false.)

In addition, this code was kind of shoddy about calling wakeup_ds()
correctly. It looks like there was an inverted condition, and sent a
wakeup to the decoder only when ds->eof was already true, which is
obviously bogus. The final EOF case tried to be somehow clever about
checking in->last_eof for notifying the codec, which is sort of OK, but
seems to be strictly worse than just checking whether ds->eof changed.
Fix these things.
2018-05-25 10:46:24 +02:00
wm4 db03f01300 ipc: cosmetic: switch a negated if/else 2018-05-25 10:46:18 +02:00
wm4 40ebedabcf ipc: alias set_property_string to set_property
The only effective difference is that the former explicitly checks
whether the JSON value type is string, and errors out if not. The rest
is exactly the same (mpv_set_property_string is mpv_set_property with
MPV_FORMAT_STRING).

It seems silly to keep this, so just remove it.
2018-05-25 10:45:59 +02:00
wm4 47ed894d19 video: trust container FPS early on if possible
If the container FPS is correct, this can help getting ideal mix factors
for vo_gpu interpolation mode. Otherwise, it doesn't matter.
2018-05-25 10:45:54 +02:00
wm4 1d46368404 manpage: mention that --no-correct-pts can break seeking too 2018-05-25 10:45:46 +02:00
wm4 58479906d8 dispatch: add an assert() 2018-05-25 10:45:07 +02:00
wm4 fae9d7744c input: move an enum back to its correct place
This was accidentally moved together with the cmd stuff.
2018-05-25 10:17:06 +02:00
wm4 5df811bd53 demux_lavf: remove ffm blacklist entry
ffm (ffserver) was removed from ffmpeg.
2018-05-25 10:17:06 +02:00
wm4 eb08cd75c1 input: add a define for the number of mouse buttons and use it
(Why the fuck are there up to 20 mouse buttons?)
2018-05-25 10:17:06 +02:00
wm4 25525cee62 vd_lavc: minor simplification for get_format fallback
The default get_format does exactly do this, so we don't need to
duplicate it.

The only potential problem with this is that the logic doesn't entirely
prevent that the avcodec_default_get_format hw_device_ctx path is
triggered, which would probably work, but has unknown consequences and
interactions. But the way the logic currently works it can't happen,
provided the hwaccel metadata libavcodec provides is correct.
2018-05-25 10:17:06 +02:00
wm4 3101cb3847 terminal-unix: stop trying to read when terminal disappears
Avoids 100% CPU usage due to terminal code retrying read(). Seems like
this was "forgotten" (or there was somehow the assumption poll() would
not signal POLLIN anymore).

Fixes #5842.
2018-05-25 10:17:06 +02:00
Niklas Haas fea87c4253 x11: support Shift+TAB
For some reason, the X default modifier map binds shift+tab to
ISO_Left_Tab instead of the regular Tab. So to get Shift+TAB recognized
by mpv, we also need to accept ISO_Left_Tab.

This patch matches what other programs like e.g. Qt do, which treat Tab
and ISO_Left_Tab as the same thing.

God only knows why the distinction exists, and why X decides to mix up
its bindings like that.

Fixes #5849
2018-05-24 22:12:02 +03:00
Aman Gupta 814869759c demux, player: fix playback of sparse video streams (w/ still images)
Fixes several issues playing back mpegts with video streams marked
as having "still images". For example, see this video which has
frames only every 6s: https://s3.amazonaws.com/tmm1/music-choice.ts

Changes include:
- start playback right away, without waiting for first video frame
- do not consider the sparse video stream in demuxer underrun detection
- do not require multiple video frames for the VO
- use audio as the master stream for demuxer metadata events
- use audio stream for playback time

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-24 10:26:41 -07:00
Aman Gupta b24bd4e570 demux_lavf: co-locate disposition checks
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-24 10:26:41 -07:00