aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
...
* vo: merge get rid of vo.aspdat fieldGravatar wm42014-01-22
| | | | | | | | | | | | 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).
* vo: move vo_get_src_dst_rects to aspect.cGravatar wm42014-01-22
| | | | | | | 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.
* video/out: don't access aspdat in VOsGravatar wm42014-01-22
| | | | | | | | | | | 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.
* vo_opengl: don't assume there'a always 1 fbconfig on successGravatar wm42014-01-21
| | | | Seems to be a reasonable assumption, but it's probably not guaranteed.
* cocoa: remove dead codeGravatar Stefano Pigozzi2014-01-21
| | | | This became dead code in commit 3f594c2e.
* w32_common: Fix extended keysGravatar James Ross-Gowan2014-01-21
| | | | The KF_* flags work on the HIWORD of lParam. Whoops
* w32: use the w32_common keymap in terminal-win tooGravatar James Ross-Gowan2014-01-19
|
* sub: uglify OSD code path with lockingGravatar wm42014-01-18
| | | | | | | | | | | | | | | 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.
* w32_common: add extended keysGravatar James Ross-Gowan2014-01-15
| | | | Also VK_APPS/MP_KEY_MENU was missing.
* w32_common: prevent decoding certain keys twiceGravatar James Ross-Gowan2014-01-15
| | | | | | | | 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.
* options: remove --screenw and --screenhGravatar wm42014-01-11
| | | | | | | | | 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.
* video/out: remove pointless x/y parameter from vo_x11_config_vo_windowGravatar wm42014-01-11
| | | | | This never made any real sense; the "backend" has to access vo->dx/dy anyway.
* video/out: simplify monitor aspect handlingGravatar wm42014-01-11
| | | | | | | | 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.
* video/out: remove fallback handling for screensize/monitor pixel aspectGravatar wm42014-01-11
| | | | | | | 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.
* cocoa: fix window placement on secondary screensGravatar Stefano Pigozzi2014-01-11
| | | | | | | | | | | | | | 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
* vd_lavc: matroska: remove weird code setting extra_huff for mjpegGravatar wm42014-01-11
| | | | | | | | | | | 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.
* vd_lavc: matroska: remove weird realvideo special handlingGravatar wm42014-01-11
| | | | | | | | | | | | | 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.
* vd_lavc: minor simplificationGravatar wm42014-01-11
|
* Factor out setting AVCodecContext extradataGravatar wm42014-01-11
|
* cocoa: refactor init window positioning codeGravatar Stefano Pigozzi2014-01-10
|
* cocoa: allow to drag and drop URLsGravatar Nyx0uf2014-01-10
| | | | | | | 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
* wayland: properly empty output listGravatar Alexander Preisinger2014-01-08
|
* wayland/shm: don't crash if initialization failedGravatar Alexander Preisinger2014-01-08
|
* wayland: fix crash when initialization failsGravatar wm42014-01-08
| | | | | | 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.
* wayland/shm: tone down warningsGravatar Alexander Preisinger2014-01-08
| | | | Those warnings are printed far too often and actually aren't usefull at all.
* wayland: fix memory leaksGravatar Alexander Preisinger2014-01-08
| | | | | There are still some leaks from wayland-cursor stuff, but there is no way to free the memory as user of the cursor library.
* wayland: cleanup registry_handle_globalGravatar Alexander Preisinger2014-01-08
| | | | | The wl_registry object is already passed as a parameter. No need to create a temporary variable.
* wayland: remove set_user_data from seat_listenerGravatar Alexander Preisinger2014-01-08
| | | | | | | | | 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.
* wayland: use static consistentlyGravatar Alexander Preisinger2014-01-08
| | | | Declare everything that is only needed inside wayland_common.c as static.
* wayland: fix fullscreen & resizing for goodGravatar Alexander Preisinger2014-01-07
| | | | | | | 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.
* wayland: silence annoying libwayland-client messageGravatar wm42014-01-07
| | | | | | | | | | | | | | | | | 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)
* wayland: fix some memory leaks on initialization failureGravatar wm42014-01-07
| | | | | | | | | | | 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.
* w32_common: reformat yet againGravatar Martin Herkt2014-01-06
| | | | | I've been told mpv prefers switch/case on the same indent level. Sorry about the noise :P
* cocoa: don't reset window size when the video size doesn't changeGravatar Stefano Pigozzi2014-01-06
| | | | Fixes #459
* w32_common: don't force topmost on fullscreenGravatar Martin Herkt2014-01-06
| | | | Fixes #457, #444.
* w32_common: reformat slightlyGravatar Martin Herkt2014-01-06
| | | | This really needs more whitespace.
* w32_common: use OLE DnD for text/uri-list supportGravatar xnoreq2014-01-06
| | | | Signed-off-by: Martin Herkt <lachs0r@srsfckn.biz>
* Revert "wayland/egl: use redraw callback"Gravatar Alexander Preisinger2014-01-04
| | | | | | | | | | | 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
* wayland: remove workaroundGravatar Alexander Preisinger2014-01-04
| | | | | | | | 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.
* wayland: fix obvious bug in dnd codeGravatar Alexander Preisinger2014-01-04
| | | | I still don't think this is the right approach.
* video/out: remove some code duplication between X11 and waylandGravatar wm42014-01-04
| | | | | | 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.
* cocoa: handle files drag and drop on the player video viewGravatar Stefano Pigozzi2014-01-04
|
* input: move files drag and drop to a new event.c fileGravatar Stefano Pigozzi2014-01-04
| | | | | 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.
* wayland/egl: misc fixes and cleanupsGravatar Alexander Preisinger2014-01-04
|
* wayland/egl: use redraw callbackGravatar Alexander Preisinger2014-01-04
| | | | | | | 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.
* wayland/egl: add egl_context to the wayland stateGravatar Alexander Preisinger2014-01-04
| | | | | | | | | | | 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.
* wayland: Remove nonsense comment and add warningGravatar Alexander Preisinger2014-01-04
| | | | | | | | | 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.
* wayland: move workaround to fullscreen codeGravatar Alexander Preisinger2014-01-04
| | | | | Because of this workaround there was a bug in the wayland vo. Now it works on both vos (opengl and shm) as it should.
* wayland: implement dropping files on the VO windowGravatar Alexander Preisinger2014-01-04
| | | | Needs some proper testing.
* vo: dropping subtitle files on the VO window adds them as subtitle filesGravatar wm42014-01-04
| | | | | | | 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.