| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Rename vo_get_src_dst_rects() to mp_get_src_dst_rects() and make it
independent from the VO (it takes a comical amount of parameters now to
pass all required state). Add a convenience wrapper with the name
vo_get_src_dst_rects() to vo.c. Replace all aspdat and vo usages with
immediate parameters.
Functionally, nothing should change, except that the window size is
clamped to a minimum of size 1 much earlier, and some log messages
change the prefix (don't bother with vo.vo_log stuff).
|
|
|
|
|
|
|
| |
The plan is to make all the code in aspect.c independent from vo.c,
which should make the code easier to understand, will allow removal of
vo->aspdat, and reduces the amount of code that accesses weird mutable
struct vo fields.
|
|
|
|
|
|
|
|
|
|
|
| |
vo->aspdat is basically an outdated version of vo->params, plus some
weirdness. Get rid of it, which will allow further cleanups and which
will make multithreading easier (less state to care about).
Also, simplify some VO code by using mp_image_set_attributes() instead
of caring about display size, colorspace, etc. manually. Add the
function osd_res_from_image_params(), which is often needed in the case
OSD renders into an image.
|
|
|
|
| |
Seems to be a reasonable assumption, but it's probably not guaranteed.
|
|
|
|
| |
This became dead code in commit 3f594c2e.
|
|
|
|
| |
The KF_* flags work on the HIWORD of lParam. Whoops
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do two things:
1. add locking to struct osd_state
2. make struct osd_state opaque
While 1. is somewhat simple, 2. is quite horrible. Lots of code accesses
lots of osd_state (and osd_object) members. To make sure everything is
accessed synchronously, I prefer making osd_state opaque, even if it
means adding pretty dumb accessors.
All of this is meant to allow running VO in their own threads.
Eventually, VOs will request OSD on their own, which means osd_state
will be accessed from foreign threads.
|
|
|
|
| |
Also VK_APPS/MP_KEY_MENU was missing.
|
|
|
|
|
|
|
|
| |
This is a bit of a hack, but in order to prevent TranslateMessage from
seeing WM_KEYDOWN messages that we already know how to decode, move the
decoding logic to the event loop. This should fix #476, since it stops
the generation of extraneous WM_CHAR messages that were triggering more
than one action on keydown.
|
|
|
|
|
|
|
|
|
| |
Doesn't make any sense anymore. X11 (which was mentioned in the manpage)
autodetects it, and everything else ignored the option values.
Since for incomprehensible reasons the backends and vo.c still need to
exchange information about the screensize using the option fields,
they're not removed yet.
|
|
|
|
|
| |
This never made any real sense; the "backend" has to access vo->dx/dy
anyway.
|
|
|
|
|
|
|
|
| |
For some reason, this made all VO backends both set the screen
resolution in opts->screenwidth/height, and call
aspect_save_screenres(). Remove the latter. Move the code to calculate
the PAR-corrected window size from aspect.c to vo.c, and make it so that
the monitor PAR is recalculated when it makes sense.
|
|
|
|
|
|
|
| |
When using --monitoraspect, but either the screen width or height or
both are unknown, a fallback is applied. This is a completely useless
obscure corner case that's going to help nobody, so get it out of the
way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a long time the cocoa backend set the xinerama_x/y and used dx/dy from the
VO instance. This somewhat worked with some workarounds but wasn't really
what was supposed to be happening. Moreover 27e4360, which touched this
workaround introduced a regression.
New code doesn't set the xinerama_x/y values so that dx/dy are offsets in the
current screen (not a virtual screen composed of all the screens). The screen
reference detected during VOCTRL_UPDATE_SCREENINFO is also passed down to the
window initialization code.
Fixes #472
|
|
|
|
|
|
|
|
|
|
|
| |
Like with the previous commit, this is probably not needed, but it's
unclear whether that really is the case. Most likely, it used to be
needed by some demuxer, and now the only demuxer left that could
_possibly_ trigger this is demux_mkv.c.
Note that mjpeg is the only decoder that reads the extra_huff option,
and nothing in libavformat actually sets the option. So maybe it's
fundamentally not needed anymore.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This case can't happen with the normal realvideo codepath in
demux_mkv.c, because the code would errors out if the extradata is too
small, and everything would be broken anyway in the case the vd_lavc.c
condition is actually triggered.
It still might happen with VfW-muxed realvideo in Matroska, though.
Basically, I'm hoping this doesn't matter anyway, and that the vd_lavc.c
code was for other old demuxers, like demux_avi or demux_rm. Following
the commit history, it's not really clear for what demuxer this code
was added.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This commit also improves the visual feedback to the user by showing a plus
icon in the mouse cursor when dragging supported types.
Fixes #469
|
| |
|
| |
|
|
|
|
|
|
| |
On X11, if no wayland compositor is running, wl_list_init() will never
be called. This will cause destroy_display() to segfault when trying to
iterate over the list.
|
|
|
|
| |
Those warnings are printed far too often and actually aren't usefull at all.
|
|
|
|
|
| |
There are still some leaks from wayland-cursor stuff, but there is no way to
free the memory as user of the cursor library.
|
|
|
|
|
| |
The wl_registry object is already passed as a parameter. No need to create
a temporary variable.
|
|
|
|
|
|
|
|
|
| |
The user_data is passed on add_listener and can later be changed with
set_user_data. But because we don't want to change it later and because it is
the same object remove the set_user_data call.
This might be a copy&paste leftover from the initial draft for the wayland
backend.
|
|
|
|
| |
Declare everything that is only needed inside wayland_common.c as static.
|
|
|
|
|
|
|
| |
I added enough logic to never set ontop or fullscreen twitce.
This commit keeps also the size of the video if multiple videos are played.
If the ratio differs the width will be kept at the same size and only the
height changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libwayland-client contains the following code [1]:
runtime_dir = getenv("XDG_RUNTIME_DIR");
if (!runtime_dir) {
fprintf(stderr,
"error: XDG_RUNTIME_DIR not set in the environment.\n");
This means this message will unconditionally and unavoidably be printed
if XDG_RUNTIME_DIR is not set. Since mpv is a terminal program, and we
want to avoid unnecessary output, work it around by not attempting to
use wayland if this environment variable is not set.
[1] http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-client.c#n636
(cd0dccd01e16fa404e03974d30ded3aebdb1c4bc)
|
|
|
|
|
|
|
|
|
|
|
| |
This commonly happens when initializing vo_opengl on a X11-only system.
Unfortunately, most wl_*_destroy() functions appear not to accept NULL
pointers, making partial deinitialization a pain: you have to add your
own NULL checks everywhere to avoid crashes.
xkb.context is uninitialized separately, because you can initialize it
just fine, even if the rest of input initialization fails.
|
|
|
|
|
| |
I've been told mpv prefers switch/case on the same indent level.
Sorry about the noise :P
|
|
|
|
| |
Fixes #459
|
|
|
|
| |
Fixes #457, #444.
|
|
|
|
| |
This really needs more whitespace.
|
|
|
|
| |
Signed-off-by: Martin Herkt <lachs0r@srsfckn.biz>
|
|
|
|
|
|
|
|
|
|
|
| |
Because of this commit there were problems displaying the frmase in their right
order.
This reverts commit 96e75d234a4df1a09f38eaf932d00d79dccdc324.
Conflicts:
video/out/gl_wayland.c
video/out/wayland_common.h
|
|
|
|
|
|
|
|
| |
The changes in the vo_wayland_ontop function have no effect on the workaround.
Somehow the problem just disappeared. I guess it is because of the new control
function in gl_wayland.c where the resize happens immediatly after the event
dispatch/flush.
|
|
|
|
| |
I still don't think this is the right approach.
|
|
|
|
|
|
| |
Both X11 and Wayland support the same format for drag & drop operations
(text/uri-list), and the code for that was copied from x11_common.c to
wayland_common.c. Factor it out.
|
| |
|
|
|
|
|
| |
event.c will be used to feed the input queue with 'global' events that don't
mesh well with the usual check_events path in mpv.
|
| |
|
|
|
|
|
|
|
| |
This solves the issue where we would not receive any frame events. The
difference to my earlier tests is that now it looks like eglSwapBuffers uses
it's own event queue or something similiar along the lines. Becaues the
performance is the same as without any redraw callback.
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment there are visual glitches when we resize the window. This happens
because in wayland there a special function for resizing EGL windows.
To prevent the glitches move the egl_context to the wayland state in
wayland_common.h and add a new control function to gl_wayland.c to wrap the
vo_wayland_control function to check for resize events.
With the new control wrapper the glitches are gone and the resizing is fluid.
|
|
|
|
|
|
|
|
|
| |
The reason a segmentation happend here was because we couldn't get the
requested minor version. The major version is enough for differentiating
between OpenGL 3 and OpenGL 2. If it fails there is still a fallback to any
version available.
Also add a warning if we use the fallback.
|
|
|
|
|
| |
Because of this workaround there was a bug in the wayland vo.
Now it works on both vos (opengl and shm) as it should.
|
|
|
|
| |
Needs some proper testing.
|
|
|
|
|
|
|
| |
Note that we don't try to be clever about detecting the files as
subtitles: we just check the file extension. We could go all the way and
check the files by opening them with a demuxer, but that would probably
do more bad than good.
|