summaryrefslogtreecommitdiffstats
path: root/video/out/vo_wayland.c
Commit message (Collapse)AuthorAgeFilesLines
* vo_wayland: drop redundant "const"wm42014-11-071-1/+1
|
* vo_wayland: don't use endian-specific defineswm42014-11-051-18/+22
| | | | | | | | | | | | Instead, use the native-endian alias, and switch the wayland format depending on the target platform's endian. This drops support for swapped-endian formats, but I think that is ok. Not only are the affected formats rather ancient and backwards, but using swapped formats probably does not make any sense for performance either. Untested.
* command: make window-scale property observablewm42014-11-021-0/+2
| | | | | | | | | | | | Add a generic mechanism to the VO to relay "extra" events from VO to player. Use it to notify the core of window resizes, which in turn will be used to mark all affected properties ("window-scale" in this case) as changed. (I refrained from hacking this as internal command into input_ctx, or to poll the state change, etc. - but in the end, maybe it would be best to actually pass the client API context directly to the places where events can happen.)
* vo_wayland: remove unnecessary checkAlexander Preisinger2014-09-161-19/+10
| | | | | buffer_pool_get_front now returns always a valid buffer. No need for corner cases.
* vo_wayland: pixel perfect buffersAlexander Preisinger2014-09-101-342/+130
| | | | | | | | | | | | | | | 1. Separate buffer and temporary file handling from the vo to make maintenance and reading code easier 2. Skip resizing as much as possible if back buffer is still busy. 3. Detach and mark osd buffers for deletion if we want to redraw them and they are still busy. This could be a possible case for the video buffers as well. Maybe better than double buffering. All the above steps made it possible to have resizing without any artifacts even for subtitles. Also fixes dozen of bugs only I knew, like broken subtitles for rgb565 buffers. I can now sleep at night again.
* vo_wayland: fix formatting inconsistenciesAlexander Preisinger2014-08-201-4/+4
|
* vo_wayand: save the flip time in the frame handlerAlexander Preisinger2014-08-201-0/+10
| | | | This value is more accurate than the default value.
* vo_wayland: fix redrawing logicwm42014-08-161-8/+8
| | | | | | I must have broken it some time ago. The error case dealing with an unavailable backbuffer was broken, and didn't handle memory management correctly.
* vo: different hack for VOs which need to mangle mouse inputwm42014-07-271-10/+3
| | | | | | | | Follow up on commit 760548da. Mouse handling is a bit confusing, because there are at least 3 coordinate systems associated with it, and it should be cleaned up. But that is hard, so just apply a hack which gets the currently-annoying issue (VO backends needing access to the VO) out of the way.
* vo: hack to avoid threading issues with mouse inputwm42014-07-261-0/+1
| | | | | | VO backends which are or will run in their own thread have a problem with vo_mouse_movement() calling vo_control(). Restrict this to VOs which actually need this.
* vo_wayland: fix clearing the screen on reconfigwm42014-06-181-12/+11
| | | | | | Do this simply by clearing the mapped buffer on every draw_image() call without an actual video frame. (Maybe this is a bit expensive, but at least not more expensive than regular video display.)
* video/out: fix redrawing with no video frame for some VOswm42014-06-181-3/+6
| | | | | | With the change to merge osd drawing into video frame drawing, some bogus logic got in: they skipped drawing the OSD if no video frame is available. This broke --no-video --force-window mode.
* vo: make draw_image and vo_queue_image transfer image ownershipwm42014-06-171-1/+5
| | | | Basically a cosmetic change. This is probably more intuitive.
* video/out: change aspects of OSD handlingwm42014-06-151-3/+7
| | | | | | | | | Let the VOs draw the OSD on their own, instead of making OSD drawing a separate VO driver call. Further, let it be the VOs responsibility to request subtitles with the correct PTS. We also basically allow the VO to request OSD/subtitles at any time. OSX changes untested.
* wayland: move subsurfaces to wayland voAlexander Preisinger2014-06-151-9/+40
| | | | | | | Subsurfaces are only used by the wayland vo. Thats why it makes sense to move all osd and subsurface specific parts to the vo_wayland.c Also destroy the subsurfaces and subcompositor properly.
* video: synchronize mpv rgb pixel format names with ffmpeg nameswm42014-06-141-21/+21
| | | | | | | | | | | This affects packed RGB formats up to 16 bits per pixel. The old mplayer names used LSB-to-MSB order, while FFmpeg (and some other libraries) use MSB-to-LSB. Nothing should change with this commit, i.e. no bit order or endian bugs should be added or fixed. In some cases, the name stays the same, even though the byte order changes, e.g. RGB8->BGR8 and BGR8->RGB8, and this affects the user-visible names too; this might cause confusion.
* options: remove global variables for swscale options; rename themwm42014-06-111-1/+1
| | | | | | Additionally to removing the global variables, this makes the options more uniform. --ssf-... becomes --sws-..., and --sws becomes --sws- scaler. For --sws-scaler, use choices instead of magic integer values.
* vo_wayland: always assume resize on reconfigurewm42014-05-061-2/+1
| | | | | | It doesn't look like vo_wayland_config() necessarily sets this flag, so it seems safer to trigger an explicit resize. This accounts for the case when playing a new file with different size than the one before.
* wayland: don't use VOCTRL_UPDATE_SCREENINFOwm42014-05-061-1/+1
| | | | Not very tested. Appears to work.
* wayland/shm: Use subsurfaces for OSDAlexander Preisinger2014-04-161-22/+99
|
* wayland/shm: fix leak in buffer poolAlexander Preisinger2014-03-061-10/+13
| | | | Rename it to reinit and check if parts of the pool are already allocated.
* wayland/shm: remove unused defineAlexander Preisinger2014-02-161-2/+0
|
* vo_wayland: silence shadowing warningwm42014-02-121-3/+3
|
* wayland/shm: rewrite buffer handlingAlexander Preisinger2014-02-111-131/+229
| | | | | | | | | | | I was unhappy with the old way of handling buffers, especially resizing. But my original plan to use wl_shm_pool_resize wasn't as good as I initially thought. I might get back to it. With the new buffer pools it now possible to select triple buffering. Also the buffer pools are also needed for the upcoming subsurfaces for osd and subtitles. I hope this change was worth it.
* wayland/shm: prevent the window from flying awayAlexander Preisinger2014-02-111-0/+2
| | | | With the new xdg_shell the problem will be no gone by itself.
* wayland: change minimum versionAlexander Preisinger2014-02-021-9/+0
| | | | | Change minimum version to 1.3 and remove the version checking in the source code.
* vo_wayland: silence shadowing warningwm42014-01-291-3/+3
| | | | No real problem.
* wayland/shm: RGB888 as default, change optionsAlexander Preisinger2014-01-281-15/+27
| | | | | | RGB565 is one of the fastest and most supported formats on low end consumer devices, but ffmpeg spams warning when using it. Make it opt-in instead of opt-out.
* wayland/shm: fix memory leakAlexander Preisinger2014-01-281-1/+4
|
* wayland/shm: remove resize boilerplateAlexander Preisinger2014-01-281-21/+4
| | | | | | The problem seems to have solved itself. I guess the previous changes to resizing and commit ba101ab made this possible. Consider me happy for removing that crap.
* vo_wayland: fix confusion of video and window sizeswm42014-01-241-2/+2
|
* sub: uglify OSD code path with lockingwm42014-01-181-1/+1
| | | | | | | | | | | | | | | 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.
* wayland/shm: don't crash if initialization failedAlexander Preisinger2014-01-081-3/+1
|
* wayland/shm: tone down warningsAlexander Preisinger2014-01-081-2/+2
| | | | Those warnings are printed far too often and actually aren't usefull at all.
* wayland: fix memory leaksAlexander Preisinger2014-01-081-0/+3
| | | | | 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: fix fullscreen & resizing for goodAlexander Preisinger2014-01-071-0/+3
| | | | | | | 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/shm: only commit new framesAlexander Preisinger2014-01-021-36/+40
| | | | | Only attach and commit new buffers. This also increases performance when paused.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Rename sub.c/.h to osd.c/.hwm42013-11-241-1/+1
| | | | | This was way too misleading. osd.c merely calls the subtitle renderers, instead of actually dealing with subtitles.
* Adjust wayland definesPaweł Forysiuk2013-11-041-1/+1
|
* configure: uniform the defines to #define HAVE_xxx (0|1)Stefano Pigozzi2013-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | The configure followed 5 different convetions of defines because the next guy always wanted to introduce a new better way to uniform it[1]. For an hypothetic feature 'hurr' you could have had: * #define HAVE_HURR 1 / #undef HAVE_DURR * #define HAVE_HURR / #undef HAVE_DURR * #define CONFIG_HURR 1 / #undef CONFIG_DURR * #define HAVE_HURR 1 / #define HAVE_DURR 0 * #define CONFIG_HURR 1 / #define CONFIG_DURR 0 All is now uniform and uses: * #define HAVE_HURR 1 * #define HAVE_DURR 0 We like definining to 0 as opposed to `undef` bcause it can help spot typos and is very helpful when doing big reorganizations in the code. [1]: http://xkcd.com/927/ related
* video/out: remove useless info struct and redundant fieldswm42013-10-231-6/+2
| | | | The author and comment fields were printed only in -v mode.
* wayland/shm: fix resizing for good (finally)Alexander Preisinger2013-09-121-7/+45
| | | | | | 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/shm: use wayland logAlexander Preisinger2013-09-121-11/+11
|
* wayland/shm: version detection that also worksAlexander Preisinger2013-09-091-3/+8
| | | | The previous method would break on the next release. Because I am stupid.
* configure: build with wayland 1.2.0Alexander Preisinger2013-09-031-0/+5
| | | | | 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.
* wayland/shm: rework format handlingAlexander Preisinger2013-08-261-47/+76
| | | | Use a linked list for all supported formats and make the format table const.
* wayland: fix memory leaksAlexander Preisinger2013-08-261-0/+3
|
* wayland/shm: use opaque regionsAlexander Preisinger2013-08-261-0/+10
| | | | | | 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.
* wayland: shm based software renderingAlexander Preisinger2013-08-251-0/+645
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