aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
* cocoa_common: signal a mouse movement when changing window sizeGravatar Stefano Pigozzi2013-09-18
| | | | | | | | | This is mainly to avoid spurious cursor states due to the mouse moving inside or outside the window as a result of the window resize (with cmd-0/1/2). This avoids complex logic and triggers a mouse move so that the player recomputes the correct cursor state based on the autohide configuration of the user.
* cocoa_common: override core's cursor visibility stateGravatar Stefano Pigozzi2013-09-18
| | | | | | | This keeps the state in sync with the current state in cocoa_common. Infact the cocoa code in mpv can decide wether it really wants to hide the cursor based on the result of the `canHideCursor` method (this is so that the cursor is only hidden when hovering on the video window).
* gl_common: add wayland backend before x11 backendGravatar Andreas Sinz2013-09-16
|
* gl_common: signal to GL backend whether we are probingGravatar wm42013-09-16
| | | | | | | | | | | This is supposed to reduce the amount of useless error messages shown during initialization of vo_opengl. If multiple backends are compiled, usually only one of them will work. For example, on Linux both X and Wayland backends can be compiled, but usually either Wayland or X is running. Then, if Wayland is not running, but X is, trying to initialize the Wayland backend should not spam the terminal with error messages. Signed-off-by: Andreas Sinz <andreas.sinz@aon.at>
* vd_lavc: reset last_sample_aspect_ratio in uninit_avctx()Gravatar xylosper2013-09-13
| | | | | | | | In init_vo(), if sh->aspect is 0 or last_sample_aspect_ratio is set, sh->aspect is overwritten. With software decoding fallback behaviour, this makes the aspect ratio from container ignored since last_sample_aspect_ratio is already set in first try with hardware decoding.
* core: add --deinterlace option, restore it with resume functionalityGravatar wm42013-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --deinterlace option does on playback start what the "deinterlace" property normally does at runtime. You could do this before by using the --vf option or by messing with the vo_vdpau default options, but this new option is supposed to be a "foolproof" way. The main motivation for adding this is so that the deinterlace property can be restored when using the video resume functionality (quit_watch_later command). Implementation-wise, this is a bit messy. The video chain is rebuilt in mpcodecs_reconfig_vo(), where we don't have access to MPContext, so the usual mechanism for enabling deinterlacing can't be used. Further, mpcodecs_reconfig_vo() is called by the video decoder, which doesn't have access to MPContext either. Moving this call to mplayer.c isn't currently possible either (see below). So we just do this before frames are filtered, which potentially means setting the deinterlacing every frame. Fortunately, setting deinterlacing is stable and idempotent, so this is hopefully not a problem. We also add a counter that is incremented on each reconfig to reduce the amount of additional work per frame to nearly zero. The reason we can't move mpcodecs_reconfig_vo() to mplayer.c is because of hardware decoding: we need to check whether the video chain works before we decide that we can use hardware decoding. Changing it so that this can be decided in advance without building a filter chain sounds like a good idea and should be done, but we aren't there yet.
* wayland/shm: fix resizing for good (finally)Gravatar Alexander Preisinger2013-09-12
| | | | | | Problem: I own the buffer and I destroyed while still being displayed. Solution: Add a temporary buffer and destroy it when the next buffer is attached.
* wayland: change fs messages to dbgGravatar Alexander Preisinger2013-09-12
| | | | These messages are only helpful when debugging.
* wayland/egl: use wayland logGravatar Alexander Preisinger2013-09-12
|
* wayland/shm: use wayland logGravatar Alexander Preisinger2013-09-12
|
* Revert "wayland: don't create our own log context"Gravatar Alexander Preisinger2013-09-12
| | | | | | | This reverts commit beab54506e61bc080880e827e351439f76542e68. Conflicts: video/out/wayland_common.c
* gl_osd: mp_msg conversionGravatar wm42013-09-12
|
* aspect: mp_msg conversionGravatar wm42013-09-12
|
* gl_lcms: mp_msg conversionGravatar wm42013-09-12
| | | | | Have to deal with some dumb stuff in LittleCMS2's API: its error handler is global.
* gl_common: complete mp_msg conversionGravatar wm42013-09-12
| | | | Hopefully this works on Wayland and Cocoa, which I didn't test.
* x11_common: mp_msg conversionGravatar wm42013-09-12
| | | | | Doesn't touch some parts, like the X11 error handler (which doesn't allow setting a context pointer).
* gl_32: mp_msg conversionGravatar Alexander Preisinger2013-09-11
|
* w32_common: mp_msg conversionGravatar Alexander Preisinger2013-09-11
|
* gl_x11: mp_msg conversionGravatar Alexander Preisinger2013-09-11
|
* cocoa_common: remove most of the special handling for cursor autohideGravatar Stefano Pigozzi2013-09-10
| | | | | | | | | | | | | | | This is mostly related to the fullscreen behaviour. cecbd8864 introduces an option to make mpv behave like a OSX user would expect. This commit changes the Cocoa parts of the code to be consistent with the behaviour on X11. Old behaviour is still available through the option mentioned in cecbd8864. There is still custom logic in the cocoa backend and it can probably be moved to core: * Don't perform autohide if the mouse is down * Don't perform autohide outside of the video window Fixes #218 (by accident)
* wayland/common: improved error messagesGravatar Alexander Preisinger2013-09-10
| | | | | The previous error message were not very usefull. Also include a hint where to look for solutions.
* wayland: update license headersGravatar Alexander Preisinger2013-09-09
|
* wayland/shm: version detection that also worksGravatar Alexander Preisinger2013-09-09
| | | | The previous method would break on the next release. Because I am stupid.
* options: remove --(no-)mouseinput optionGravatar wm42013-09-08
| | | | I have no idea why it exists, as it's redundant to --(no-)mouse-movements.
* x11_common: don't allocate more than needed for iconGravatar wm42013-09-04
| | | | | | | | | icon_size is the number of array items of type long, not bytes. Change the type of icon_size to int, because size_t makes you think of byte quantities too quickly. As an unrelated change, change the (char *) cast to (unsigned char *), because it matches the common XChangeProperty idiom better.
* configure: build with wayland 1.2.0Gravatar Alexander Preisinger2013-09-03
| | | | | For the time being there will be a check if someone uses wayland from git, because I really really like to have the others formats too.
* cocoa_common: remove unlocking from fullscreen functionGravatar Stefano Pigozzi2013-09-02
| | | | | This was added in the past to prevent a deadlock, but is not needed anymore.
* cocoa_common: avoid the opengl view to leak it's stateGravatar Stefano Pigozzi2013-09-02
| | | | | Just because everything is in a single file it doesn't excuse us to have high coupling between C and ObjC code.
* x11: add window iconGravatar wm42013-09-01
| | | | | | | | | | | | | | | | | | | | | The png file added to etc/ are taken from the link mentioned in commit 303096b, except that they have been converted to 16 bit, sRGB (with color profile info dropped, if there was one), and transparent pixels reset for better compression. The file x11_icon.bin is generated by gen-x11-icon.sh. I'm adding it to the git repo directly, because the script requires ImageMagick, and we don't want to make building even more complicated. The way how this is done is basically a compromise between effort required in x11_common.c and in gen-x11-icon.sh. Ideally, x11_icon.bin would be directly in the format as required by _NET_WM_ICON, but trying to write the binary width/height values from shell would probably be a nightmare, so here we go. The zlib code in x11_common.c is lifted from demux_mkv.c, with some modifications (like accepting a gzip header, because I don't know how to make gzip write raw compressed data).
* input: deal with spurious X11 LeaveNotify eventsGravatar wm42013-09-01
| | | | | | | | | | | | | | | | | | | | | If the mpv window is unfocus, clicking on the OSC should focus the window (done by the window manager) and allow interaction with the OSC. But somehow X sends a spurious LeaveNotify event, immediately followed by an EnterNotify event. This happens at least with IceWM. The result is that the OSC will disappear (due to receiving MOUSE_LEAVE). The OSC will stay invisible, because EnterNotify isn't handled, and there's nothing that could make the OSC appear again. Solve this by handling EnterNotify. We cause a redundant MOUSE_MOVE event to be sent, which triggers the code to make the OSC visible. We have to remove the code from input.c, which ignores redundant mouse move events. Since the code ignoring redundant mouse move events is still needed on Windows, move that code to w32_common.c. The need for this is documented in the code, also see commit 03fd2fe. (The original idea was to save some code by having this code in the core, but now it turns out that this didn't quite work out.)
* input: add some more X11 multimedia/internet keysGravatar wm42013-09-01
| | | | | | | | These keys can be found on various "multimedia" and "internet" keyboard. X defines many keycodes, so I'm not adding all, just what I found on my own keyboard. Other key codes can be added on request.
* cocoa_common: enable click-through on the video viewGravatar Stefano Pigozzi2013-09-01
| | | | | | Generate a mouse down event on the first click so that one can interact with the OSC directly as opposed to wasting the first click in order to focus the window.
* cocoa_common: track mouse move events when not focusedGravatar Stefano Pigozzi2013-09-01
| | | | | This is really only important with the OSC and makes the tracking code behave more consistently with the X11 one.
* video: add unscaled mode with --video-unscaledGravatar wm42013-09-01
|
* gl_video: don't crash if no FBOs are availableGravatar wm42013-08-28
| | | | | | | | This probably has been broken since bbc865a: a test was added that uses a FBO, but it's always run, even if FBOs were not detected. On the other hand, fbotex_init() just runs into an assert. Fix the test that triggered this condition, and make fbotex_init() "nicer" by just failing if FBOs are not available.
* wayland/shm: rework format handlingGravatar Alexander Preisinger2013-08-26
| | | | Use a linked list for all supported formats and make the format table const.
* wayland: fix memory leaksGravatar Alexander Preisinger2013-08-26
|
* cocoa_common: autohide dock when autohiding menubarGravatar Stefano Pigozzi2013-08-26
| | | | A cocoa bug doesn't allow to do otherwise. Will open a radar later.
* wayland: don't create our own log contextGravatar Alexander Preisinger2013-08-26
| | | | This was more problematic than useful ([vo/wayland/wayland])
* wayland/shm: use opaque regionsGravatar Alexander Preisinger2013-08-26
| | | | | | Make use of opaque regions on non-alpha formats. This allows the compositor to improve the drawing of the surface, because he can discard everything behind the window when drawing.
* gl_video: fix odd video sizes with PBOsGravatar wm42013-08-26
| | | | | | | | | Odd video sizes if pixel formats with chroma subsampling and PBOs were used, garbage was rendered. This was because the PBO path created buffers with an unpadded size, and then tried to upload a padded image to it. Fix it by explicitly setting the padded size. (As with the non-PBO path, we rely that image allocations are somehow padded, which is normally the case.)
* wayland: shm based software renderingGravatar Alexander Preisinger2013-08-25
| | | | | | | | | | | | | | | | | | | | A wayland output based on shared memory. This video output is useful for x11 free systems, because the current libGL in mesa provides GLX symbols. It is also useful for embedded systems where the wayland backend for EGL is not implemented like the raspberry pi. At the moment only rgb formats are supported, because there is still no compositor which supports planar formats like yuv420p. The most used compositor at the moment, weston, supports only BGR0, BGRA and BGR16 (565). The BGR16 format is the fastest to convert and render without any noticeable differences to the BGR32 formats. For this reason the current (very basic) auto-detection code will prefer the BGR16 format. Also the weston source code indicates that the preferred format is BGR16 (RGB565). There are 2 options: * default-format (yes|no) Which uses the BGR32 format * alpha (yes|no) For outputting images and videos with transparencies
* wayland: remove shm listener for the backendGravatar Alexander Preisinger2013-08-25
| | | | | | The obtained information from the shm listener isn't used by anything and is also wrong now in wayland git master branch because of new shm formats which need a different way of saving the supported formats.
* wayland/egl: rework resizing (again)Gravatar Alexander Preisinger2013-08-25
| | | | | | | | | Moves a good chunk of the resizing code to wayland_common.c. This makes it possible to share it with future video drivers. It doesn't resizit it immediatly, it calcutlates the new position and size and then shedules a resizing event. This removes the ugly callback and void pointer from the wayland data structure.
* vo_corevideo: use dwidth/dheight for window dimensionsGravatar Stefano Pigozzi2013-08-25
| | | | | In the previous commit I wrongly used params->d_h/d_w which happened to work by chance.
* vo_corevideo: convert to use reconfig instead of configGravatar Stefano Pigozzi2013-08-25
|
* vo_corevideo: don't set colormatrix on direct rendering pathGravatar Stefano Pigozzi2013-08-25
| | | | | | | | | | | The current code uses GL_YCBCR_422_APPLE texture format. This allows to handle transparently the conversion to RGB but always use BT.601 colormatrix [1]. Hopefully I can adapt gl_video to take CVPixelBuffers soon so that `vo=opengl` can be used instead of `vo=corevideo` with `hwdec=vda` [1]: http://www.opengl.org/registry/specs/APPLE/ycbcr_422.txt http://www.opengl.org/registry/specs/APPLE/rgb_422.txt
* vo_corevideo: fix regression in colormatrix handlingGravatar Stefano Pigozzi2013-08-25
| | | | | | | | | | Regression since 18b6c01d92. That commit changed the colorspace handling to always reinit the video output. Since the CVPixelBuffers are lazily created, VOCTRL_SET_YUV_COLORSPACE was always called when the CVPixelBufferRef was NULL. Since CoreVideo functions do not complain when called on NULL, no one noticed that CVBufferSetAttachment, which stored the color matrix meta data was called on NULL.
* video: handle video output levels with mp_image_paramsGravatar wm42013-08-24
| | | | | | | | | | | | Until now, video output levels (obscure feature, like using TV screens that require RGB output in limited range, similar to YUY) still required handling of VOCTRL_SET_YUV_COLORSPACE. Simplify this, and use the new mp_image_params code. This gets rid of some code. VOCTRL_SET_YUV_COLORSPACE is not needed at all anymore in VOs that use the reconfig callback. The result of VOCTRL_GET_YUV_COLORSPACE is now used only used for the colormatrix related properties (basically, for display on OSD). For other VOs, VOCTRL_SET_YUV_COLORSPACE will be sent only once after config instead of twice.
* vo_image: simplifyGravatar wm42013-08-24
|