summaryrefslogtreecommitdiffstats
path: root/video/out/gl_wayland.c
Commit message (Collapse)AuthorAgeFilesLines
* vo_opengl: remove pointless glFinish callswm42014-12-191-2/+0
|
* gl_wayland: fix crash after eglInitialze failedAlexander Preisinger2014-08-301-6/+8
| | | | | Only execute most of the opengl termination procedure if we actually have an egl context.
* gl_wayland: Don't try to resize the egl_window before it existsMichael Forney2014-08-041-0/+3
| | | | | | | If the compositor sends a configure event immediately after a window is created (for example, if it implements tiling window management), mpv will attempt to call wl_egl_window_resize before it has actually created the egl_window, causing a crash.
* gl_wayland: remove probably unneeded workaroundwm42014-05-311-2/+0
| | | | | | | | This would imply eglGetProcAddress() doesn't work correctly, but using dlsym() does. For now get rid of it - it won't work in libmpv, and we'll probably need a better workaround if it's still broken. This code was in the initial wayland commit.
* video/out: remove unused config() parameterswm42014-05-071-4/+1
| | | | This was cleaned up yesterday.
* wayland: don't use VOCTRL_UPDATE_SCREENINFOwm42014-05-061-6/+4
| | | | Not very tested. Appears to work.
* wayland/shm: Use subsurfaces for OSDAlexander Preisinger2014-04-161-1/+1
|
* wayland: fix memory leaksAlexander Preisinger2014-01-081-2/+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.
* Revert "wayland/egl: use redraw callback"Alexander Preisinger2014-01-041-26/+1
| | | | | | | | | | | 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/egl: misc fixes and cleanupsAlexander Preisinger2014-01-041-5/+1
|
* wayland/egl: use redraw callbackAlexander Preisinger2014-01-041-1/+29
| | | | | | | 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 stateAlexander Preisinger2014-01-041-67/+53
| | | | | | | | | | | 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 warningAlexander Preisinger2014-01-041-4/+2
| | | | | | | | | 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/opengl: fix garbage bordersAlexander Preisinger2014-01-021-1/+0
| | | | | It seems mpv draws garbage in those regions. Now we calculate the aspect and let weston draw the black borders.
* wayland/egl: use wayland logAlexander Preisinger2013-09-121-10/+7
|
* Revert "wayland: don't create our own log context"Alexander Preisinger2013-09-121-5/+8
| | | | | | | This reverts commit beab54506e61bc080880e827e351439f76542e68. Conflicts: video/out/wayland_common.c
* gl_common: complete mp_msg conversionwm42013-09-121-2/+3
| | | | Hopefully this works on Wayland and Cocoa, which I didn't test.
* wayland: update license headersAlexander Preisinger2013-09-091-9/+6
|
* wayland: don't create our own log contextAlexander Preisinger2013-08-261-8/+5
| | | | This was more problematic than useful ([vo/wayland/wayland])
* wayland/egl: rework resizing (again)Alexander Preisinger2013-08-251-54/+24
| | | | | | | | | 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.
* wayland: switch to the new mp_msg apiAlexander Preisinger2013-07-311-0/+7
|
* wayland: Fallback to any GL version if 3.0 is not supportedMichael Forney2013-07-191-2/+11
| | | | This fixes playback on Wayland with older GPUs.
* wayland: use a unified struct for the stateAlexander Preisinger2013-07-181-19/+18
| | | | | | | | | | This commit removes the pointer to the single different structures for input and window and puts them as anonymous structures inside the wayland_state structure. This has the disadvantage of passing the substructure to the listeners, but the advantage is that we don't have to allocate them and check for NULL pointers. This makes it more reliable and easier to follow.
* wayland: don't resize in gl_wayland.cAlexander Preisinger2013-07-181-5/+1
| | | | | | The vo_wayland_fullscreen handles resizing for the video, because the video could still be in fullscreen mode and resizing it in gl_wayland could make it grow or shrink.
* video: remove fullscreen flags chaoswm42013-07-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a MPOpts fullscreen field, a mp_vo_opts.fs field, and VOFLAG_FULLSCREEN. Remove all these and introduce a mp_vo_opts.fullscreen flag instead. When VOs receive VOCTRL_FULLSCREEN, they are supposed to set the current fullscreen mode to the state in mp_vo_opts.fullscreen. They also should do this implicitly on config(). VOs which are capable of doing so can update the mp_vo_opts.fullscreen if the actual fullscreen mode changes (e.g. if the user uses the window manager controls). If fullscreen mode switching fails, they can also set mp_vo_opts.fullscreen to the actual state. Note that the X11 backend does almost none of this, and it has a private fs flag to store the fullscreen flag, instead of getting it from the WM. (Possibly because it has to deal with broken WMs.) The fullscreen option has to be checked on config() to deal with the -fs option, especially with something like: mpv --fs file1.mkv --{ --no-fs file2.mkv --} (It should start in fullscreen mode, but go to windowed mode when playing file2.mkv.) Wayland changes by: Alexander Preisinger <alexander.preisinger@gmail.com> Cocoa changes by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* wayland: early aspect calculation in vo_configAlexander Preisinger2013-07-161-7/+24
| | | | | | | | | | | | Calculate the aspect ratio in vo_config, when we get the window size and in the inside the resize function we calculate the aspect ratio of the output in order to determine if we have to change the height or the width of the video. If the ratio of the output is bigger than the ratio of the video then we have to set the width accordingly and if the ratio is smaller we change the size. But only if no resize edges are passed, because this indicates that we want to change the windows state instead of just a simple resize and the video should not grow bigger than the requested size.
* wayland: introduce vo_wayland_configAlexander Preisinger2013-05-261-7/+2
| | | | | This removes the need for exposing vo_wayland_fullscreen and other functions also this will be usefull for other vos in the future.
* video/out: introduce vo_control for gl_common based VOswm42013-05-261-4/+1
| | | | | | | | | | | | | | | | Instead of having separate callbacks for each backend-handled feature (like MPGLContext.fullscreen, MPGLContext.border, etc.), pass the VOCTRL responsible for this directly to the backend. This allows removing a bunch of callbacks, that currently must be set even for optional/lesser features (like VOCTRL_BORDER). This requires changes to all VOs using gl_common, as well as all backends that support gl_common. Also introduce VOCTRL_CHECK_EVENTS. vo.check_events is now optional. VO backends can use VOCTRL_CHECK_EVENTS instead to implementing check_events. This has the advantage that the event handling code in VOs doesn't have to be duplicated if vo_control() is used.
* wayland: reworked resizingAlexander Preisinger2013-05-071-46/+39
| | | | | | | | | | This fixes 2 bugs: * Resizing very fast breaks the aspect of the window and the width and height don't match with the video anymore * Pressing 'f' for fullscreen very fast can overwrite the backup variables for the previous width and height. Also includes a better aspect calculation with fluid resizing.
* wayland: use vo flags for enabling alpha supportAlexander Preisinger2013-04-021-3/+5
| | | | I missed the VOFLAG for enabling alpha support
* wayland: enable alpha supportAlexander Preisinger2013-04-021-1/+1
| | | | | | It is now possible to show images and videos with alpha information correctly. This was disalbed before, because there was a bug that made black parts of videos also transparent.
* gl_common: split into platform specific fileswm42013-03-281-0/+259
Do this instead of stuffing all x11/cocoa/win32/wayland specific code into gl_common.c. The cocoa specific parts could probably go directly into cocoa_common.m, possibly same with wayland. Also redo how the list of backends is managed. Get rid of the GLTYPE_ constants. Instead of having a big switch() on GLTYPE_, each backend entry has a function pointer to setup the MPGLContext callback (e.g. mpgl_set_backend_x11()).