Commit Graph

44620 Commits

Author SHA1 Message Date
wm4 29f9e44723 manpage: minor addition for --video-sync
Nobody needs to read all the text below it, really.
2017-03-25 17:06:04 +01:00
Dan Oscarsson 5b75142a1d sub: add SDH subtitle filter
Add subtitle filter to remove additions for deaf or hard-of-hearing
(SDH). This is for English, but may in part work for others too.
This is an ASS filter and the intention is that it can always be
enabled as it by default do not remove parts that may be normal text.
Harder filtering can be enabled with an additional option.

Signed-off-by: wm4 <wm4@nowhere>
2017-03-25 15:04:05 +01:00
Matthias Hunstock 3e93c09cff command: add demux-start-time property
Add a demux_start_time property, update docs.
2017-03-25 14:44:11 +01:00
James Ross-Gowan dbec486add droptarget: fix style and refactor
This makes the code more closely match mpv's style. Specifically, it
changes some names from camelCase to snake_case, removes some Hungarian
notation, replaces direct vtbl access with COM macros, makes use of the
SAFE_RELEASE macro, moves some declarations closer to their first use,
and fixes the brace style, as well as a few other things.

This also makes the IDropTargetVtbl static and it fixes the buggy
QueryInterface implementation.
2017-03-26 00:41:16 +11:00
James Ross-Gowan 0af8ec08f8 w32_common: move the IDropTarget impl to a separate file
This was mostly self-contained, so its removal makes w32_common.c a bit
easier to read. Also, because it was self contained and its author has
agreed to LGPL relicencing, the new file has the LGPL licence header.
2017-03-26 00:41:16 +11:00
igv 16e8ecb031 vo_opengl: replace uniform variable image_size with input_size
input_size can be the size of a cropped image

Signed-off-by: wm4 <wm4@nowhere>
2017-03-25 13:40:04 +01:00
igv 6b8dadd7c1 vo_opengl: add tex_offset uniform variable to user shaders 2017-03-25 13:39:21 +01:00
igv 2aae5ce0ba vo_opengl: make size of a cropped source image available to user shaders 2017-03-25 13:39:15 +01:00
Jan Janssen febeff8fee TOOLS: add lua script for runtime acompressor ffmpeg filter control 2017-03-25 12:57:10 +01:00
Jan Janssen 222899fbbe af_drc: remove
Remove low quality drc filter. Anyone whishing to have dynamic range
compression should use the much more powerful acompressor ffmpeg filter:

    mpv --af=lavfi=[acompressor] INPUT

Or with parameters:

    mpv --af=lavfi=[acompressor=threshold=-25dB:ratio=3:makeup=8dB] INPUT

Refer to https://ffmpeg.org/ffmpeg-filters.html#acompressor for a full
list of supported parameters.

Signed-off-by: wm4 <wm4@nowhere>
2017-03-25 12:57:10 +01:00
wm4 d663a0e90d manpage: add empty line between protocol header/description
Appears to give better formatting. (I'll never understand rst...)
2017-03-25 12:51:50 +01:00
Frederick Eaton 7e1d279d73 manpage: explain more about outstanding dvdnav bugs 2017-03-25 12:50:04 +01:00
Ricardo Constantino aae0833fc6
osc: fix PlayResX undefined warning when aspect is 0 2017-03-24 16:23:39 +00:00
Ricardo Constantino bc8710a98d
osc: bottom/topbar: don't clip title vertically 2017-03-24 16:16:12 +00:00
Ricardo Constantino aee08e3f51
osc: bottom/topbar: increase timecodes width a bit
Compensates for wider fonts like DejaVu Sans Mono.
Further compensate for the minus sign in the right timecode by 10px.

Closes #3952
2017-03-24 16:16:11 +00:00
Ricardo Constantino 03b2710dc8
osc: refactor cache status display
This removes the twitch of the right-aligned cache status.
2017-03-24 16:16:10 +00:00
Ricardo Constantino bcb2db078c
osc: refactor osc message scaling
Will still hide playlist items with long enough filenames and osd-font-size
but not as soon.

osc messages should now preserve their scaling with fullscreen toggling and
cycling through audio-only files and files with video.

Closes #4081, #4083, #4102
2017-03-24 16:16:07 +00:00
wm4 ab555c42ec vo_x11: fix an unused variable warning 2017-03-24 15:31:10 +01:00
wm4 b9e4fb952d command: add a property to signal whether networking is used
Requested. The property semantics are a bit muddy due to lack of effort.
Anticipated use is different display of cache status, so it should not
matter anyway.
2017-03-24 15:31:01 +01:00
rr- 8de7ba6dfd vo_x11: reduce flickering on playlist navigation
The delay between call to .resize, which cleared the buffer, and
actually rendering the first video frame, was significant, resulting in
short flicker on navigation and resizing. This was especially visible
when zooming and navigating between images.

Now the clearing is scheduled to happen just before the rendering, which
looks to be good enough even without double buffering.
2017-03-24 14:09:02 +01:00
giwhub c345680e8c mpv.desktop: fix some mistakes in mpv.desktop
Signed-off-by: wm4 <wm4@nowhere>
2017-03-23 19:49:07 +01:00
wm4 a993a871ee encode_lavc: fix build failure after libavcodec major bump 2017-03-23 11:30:11 +01:00
wm4 00d74a509a video: fix a typo in a comment 2017-03-23 11:16:02 +01:00
wm4 e73d6e8b63 vd_lavc: fix potential build failure with vaapi
If vaapi was found, but neither the old or new libavcodec vaapi hwaccel
API, then HAVE_VAAPI_HWACCEL will be defined, but not _OLD or _NEW. The
HAVE_VAAPI_HWACCEL define pretty much exists only for acrobatics with
our own waf dependency checker helper code.
2017-03-23 11:15:52 +01:00
wm4 a52a52fa6e vdpau: support new vdpau libavcodec decode API
The new API works like the new vaapi API, using generic hwaccel support.

One minor detail is the error message that will be printed if using
non-4:2:0 surfaces (which as far as I can tell is completely broken in
the nVidia drivers and thus not supported by mpv). The HEVC warning
(which is completely broken in the nVidia drivers but should work with
Mesa) had to be added to the generic hwaccel code.

This also trashes display preemption recovery. Fuck that. It never
really worked. If someone complains, I might attempt to add it back
somehow.

This is the 4th iteration of the libavcodec vdpau API (after the
separate decoder API, the manual hwaccel API, and the automatic vdpau
hwaccel API). Fortunately, further iterations will be generic, and not
require much vdpau-specific changes (if any at all).
2017-03-23 11:14:11 +01:00
wm4 b0cbda84ed vo_opengl: add a backend start_frame callback for context_vdpau
Might be useful for other backends too. For context_vdpau, resize
handling, presentation, and handling the mapping state becomes somewhat
less awkward.
2017-03-20 13:37:47 +01:00
wm4 8fb9cc2534 vo_opengl: read framebuffer depth from actual FBO used for rendering
In some cases, such as when using the libmpv opengl-cb API, or with
certain vo_opengl backends, the main framebuffer is never accessed.
Instead, rendering is done to a FBO that acts as back buffer. This meant
an incorrect/broken bit depth could be used for dithering.

Change it to read the framebuffer depth lazily on the first render call.

Also move the main FBO field out of the GL struct to MPGLContext,
because the renderer's init function does not need to access it anymore.
2017-03-20 13:31:28 +01:00
wm4 03fe50651b vo_opengl: move some init_gl code to utility functions 2017-03-20 13:20:35 +01:00
wm4 80b89cef61 manpage: fix a typo 2017-03-20 05:34:56 +01:00
wm4 7e4a73c8e4 vo_opengl: add a --opengl-es=force2 option
Useful for testing. Unfortunately, the nVidia EGL driver ignores this,
and returns a GLES 3.2 context anyway (which it is allowed to do). Might
still be useable with ANGLE, which will really give you a GLES 2 context
if you ask for it.
2017-03-20 04:57:51 +01:00
wm4 f8861f681f vo_opengl: properly respect dither option if dumb mode is used
When dumb mode is used (the "simple" rendering path), respect the dither
options. Options should never be ignored (except in GLESv2 mode); either
they should be respected in dumb mode, or they should disable dumb mode.
In this case, the former applies.
2017-03-20 04:46:18 +01:00
wm4 84bf6aabf0 vo_opengl: context_vdpau: resize output surfaces lazily
This actually fixes the dreaded errors during resizing. It works pretty
much like before, except each surface is reallocated before it's used.
It implies surfaces with the old size remain in the presentation queue
and will be displayed.
2017-03-19 09:26:10 +01:00
wm4 d2dc29f221 vo_opengl: context_vdpau: minor fixes
Don't assume 0 is an invalid object handle. vdpau with its weird API
design makes all objects indexes, with 0 being a perfectly valid and
common value. You need to use VDP_INVALID_HANDLE, which is not 0.

Don't crash if init fails at vdpau initialization. It's because
mp_vdpau_destroy(NULL) crashes. Simplify it.

Destroy output surface backed FBO before output surface. Also, strictly
bookkeep the map/unmap calls (and unmap surfaces before destroying the
FBO/texture). I can't see a change in the weird errors when resizing the
window, but I guess it's slightly more correct.

Add the GL_WRITE_DISCARD_NV symbol to header_fixes.h, because we might
fail compilation with headers that do not contain the vdpau extension
(well, probably doesn't matter).
2017-03-19 09:03:13 +01:00
wm4 03933f3564 vo_opengl: fix some undefined behavior
The gl_timer_last_us() function could access samples[-1]. Fix by
coercing to unsigned, so the % will put it into index [0,max). The
real value returned in this corner case doesn't mean too much, I
guess.
2017-03-18 20:22:50 +01:00
wm4 c3248369ac vo_opengl: add experimental vdpauglx backend
As the manpage says, this has no value other than adding bugs.

It uses code based on context_x11.c, and basically does very stripped
down context creation (no alpha support etc.). It uses vdpau for
display, and maps vdpau output surfaces as FBOs to render into them.

This might be good to experiment with asynchronous presentation. For
now, it presents synchronously, with a 4 frame delay (which should whack
off A/V sync). The forced 4 frame delay is probably also why interaction
feels slower.

There are some weird vdpau errors on resizing and uninit. No idea what
causes them.
2017-03-18 17:43:57 +01:00
wm4 be8c9485b6 vo_opengl: add log field to MGLContext
Should have done this 1000 years ago. Now GL backends can use mp_log
macros directly on the MPGLContext, instead of doing stupid things like
for example MP_WARN(ctx->vo, ...).
2017-03-18 17:40:57 +01:00
wm4 46e3dc27af screenshot: change details of --screenshot-format handling
This is just a pointless refactor with the only goal of making
image_writer_opts.format a number.

The pointless part of it is that instead of using some sort of arbitrary
ID (in place of a file extension string), we use a AV_CODEC_ID_. There
was also some idea of falling back to the libavcodec MJPEG encoder if
mpv was not linked against libjpeg, but this fails. libavcodec insist on
having AV_PIX_FMT_YUVJ420P, which we pretend does not exist, and which
we always map to AV_PIX_FMT_YUV420P (without the J indicating full
range), so encoder init fails. This is pretty dumb, but whatever. The
not-caring factor is raised by the fact that we don't know that we
should convert to full range, because encoders have no proper way to
signal this. (Be reminded that AV_PIX_FMT_YUVJ420P is deprecated.)
2017-03-18 15:03:05 +01:00
wm4 8e75297c26 image_writer: remove useless formats
Nobody cares about those.
2017-03-18 14:24:53 +01:00
Cheng Sun d17a719f4e ao_jack: update latency on buffer_size/graph change
The buffer_size may be updated before the process callback is called for
the first time. Or, the connection graph could change, which changes the
latency of the pipeline after mpv's output. Ensure we keep on top of
these changes by registering callbacks to update our latency estimation.
2017-03-18 14:15:34 +01:00
wm4 d26788fbd7 screenshot: minor simplification
This also will set image=NULL, if the video frame is marked as hwaccel,
and could not be copied to normal RAM. This will probably change the
error message (due to screenshot_get() returning NULL, instead of making
image conversion fail at a later point), but the behavior is the same
anyway.
2017-03-18 14:15:34 +01:00
wm4 8a28f94a7e manpage: slightly improve screenshot-raw description 2017-03-18 14:15:34 +01:00
Rostislav Pehlivanov d276a01ac3 wayland_common: organize and correctly map mouse buttons
The function tried to do something clever but ignored the fact that
the middle button followed the left button rather than the right.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-03-17 06:25:32 +00:00
wm4 38872463a0 client API: clarify what stream_cb callbacks can do
See #4227.
2017-03-17 04:54:39 +01:00
wm4 923f9322a1 manpage: minor clarification to screenshot command argument handling 2017-03-15 19:40:39 +01:00
qrwyeui 50abbf76e6 stream_dvd: fix subs/audio detection on DVDs containing multi-PGC titles
On some DVDs, title number is not necessarily the same as the (first)
PGC number.  (Most often they are equal, since there's usually exactly
one PGC per title, which is likely why this issue wasn't noticed
before.)  When searching for audio/subtitle metadata, we want to look
at the actual PGC we're about to play.  See discussion in issue #4235.

Signed-off-by: wm4 <wm4@nowhere>
2017-03-15 02:54:18 +01:00
wm4 9a23a14cec sd_ass: disable --sub-fix-timing if sub style override is fully disabled
This means the subtitles will show as "intended".

For some weird reason, --sub-ass-style-override is the option that
controls style override, which implies it's specific to ASS. While that
seems weird and doesn't always reflect reality, I don't care about that
now.
2017-03-15 01:54:55 +01:00
wm4 77cbb35437 build: disable optical media libs by default (DVD/BD/CD)
Pure garbage.
2017-03-15 01:20:47 +01:00
wm4 4e384c8e69 vdpau: warn on HEVC due to completely broken nVidia drivers
I guess that's the full extent I still care about nVidia's broken
garbage. In theory, we could always force the video mixer (which is the
only method getting the video data that works), but why bother.
2017-03-14 23:29:47 +01:00
wm4 94e82bcdb8 ao_alsa: fix device filtering, add another exception
The "return false;" was debugging code.

In addition, filter a plain "default", because it's not going to do
anything interesting and just looks ugly.
2017-03-14 18:06:17 +01:00
wm4 d606b6af17 player: specifically log audio EOF too 2017-03-14 15:55:42 +01:00