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

44634 Commits

Author SHA1 Message Date
Ricardo Constantino
ebf61267f4
Revert "osc: make the title toggleable between media-title and filename"
This reverts commit 6573b73462.
2017-03-27 18:00:54 +01:00
Akemi
265547eb94 osx: fix event propagation of menu bar item key shortcuts
a small logic error in 063ca8f broke the filtering of the menu bar item
key shortcuts. they where called several times per event because the
propagation wasn't stopped properly.
2017-03-27 01:29:45 +02:00
Akemi
c083a7f53e cocoa: fix retrieval of unfs window size
there are two minor bugs. mpv could try to retrieve the size when in
fullscreen and would get the fullscreen size. to fix that we keep track
of the window size before going into fullscreen.

the second small bug is when using HiDPI resolution and the
--hidpi-window-scale option. we actually want the OSD to show the proper
window scale depending on the hidpi settings. before when resizing the
window to double the size it could show "window-scale: 1.0" or
"window-scale: 0.5" when resizing to normal size. now it considers the
backing scale factor and the hidpi option to return a logical correct
window size.
2017-03-26 20:41:20 +02:00
Akemi
5e066670d0 cocoa: fix first responder when borderless window is used
this fixes a weird behaviour when a borderless window's style mask is
set to a none-borderless style mask. this can happen when cycling the
border or just toggling fullscreen. what happens is that the first
responder is reset to the NSWindow instead of being kept, the events
view in our case. this happens without the usual resignFirstResponder,
becomeFirstResponder routine.

this is a small workaround that overrides the setStyleMask method. it
keeps the first responder from before the style mask change and resets
this first responder after the new style mask was applied.
2017-03-26 20:38:26 +02:00
Akemi
063ca8f0fe osx: fix key input in certain circumstances
for a reason i can just assume some key events can vanish from the
event chain and mpv seems unresponsive.

after quite some testing i could confirm that the events are present at
the first entry point of the event chain, the sendEvent method of the
Application, and that they vanish at a point afterwards. now we use
that entry point to grab keyDown and keyUp events. we also stop
propagating those key events to prevent the no key input' error sound.
if we ever need the key events somewhere down the event chain we need
to start propagating them again. though this is not necessary currently.
2017-03-26 20:38:26 +02:00
Akemi
f8a223b7ac osx: initial Touch Bar support 2017-03-26 20:26:18 +02:00
Avi Halachmi (:avih)
afbd657bb8 command: add expand-text command to property-expand a string 2017-03-26 19:58:51 +02:00
Ricardo Constantino
6573b73462
osc: make the title toggleable between media-title and filename
Close #4221
2017-03-26 14:41:03 +01:00
wm4
3eb6607e5e player: make new stream output more consistent with other output
It seems we generally skip the space, such as seen on the AO init line.
2017-03-26 14:13:36 +02:00
Dan Oscarsson
823f2c603d player: print additional stream info
In print_stream print additional stream info for audio
and video track. While it may be incorrect it is mostly
correct and good info to have.
2017-03-26 14:12:39 +02:00
wm4
a94013f585 command: change and simplify filter toggle syntax
"@name:!" becomes simply "@name". This is actually slightly more complex
to parse, but makes for a much simpler syntax and will be less weird to
the user. Suggested by haasn.

The old syntax is now rejected with an error.

Also add some more explicit error checks, instead of e.g. allowing empty
filter names and erroring only when it's not found.
2017-03-26 13:13:34 +02:00
James Ross-Gowan
439e2b43c3 vo_opengl: angle: add --angle-flip to set the present model
DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL might be buggy on some hardware.
Additionaly DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL might be supported on some
Windows 7 systems with the platform update, but it might have poor
performance. In these cases, the user might want to disable the use of
DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL swap chains with --angle-flip=no.
2017-03-26 21:50:01 +11:00
wm4
b0086d6243 m_option: consistent af/vf filter entry "enabled" flag default value
It should default to true, but setting the filter list via mpv_node
(relevant for client API and Lua scripting) left it to false.

Also "document" the flag.
2017-03-25 18:13:04 +01:00
wm4
7d424b4ce4 command: add better runtime filter toggling method
Basically, see the example in input.rst.

This is better than the "old" vf-toggle method, because it doesn't
require the user to duplicate the filter string in mpv.conf and
input.conf.

Some aspects of this changes are untested, so enjoy your alpha testing.
2017-03-25 17:07:40 +01:00
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