summaryrefslogtreecommitdiffstats
path: root/video/out
Commit message (Collapse)AuthorAgeFilesLines
* vo_opengl: some option changeswm42013-07-222-1/+21
| | | | | | Doing "mpv --vo=opengl:lscale=help" now lists possible scalers and exits. The "backend" suboption behaves similar. Make the "stereo" suboption a choice, instead of using magic integer values.
* vo_direct3d: use new option APIwm42013-07-221-85/+34
|
* vo_opengl_old: use new option APIwm42013-07-224-167/+64
|
* options: move --colorkey option to vo_xvwm42013-07-221-3/+8
|
* vo_xv: use new option APIwm42013-07-221-84/+25
|
* vo_direct3d: fix warning on MinGWwm42013-07-221-5/+0
| | | | | | Commit 6ab2eeb attempted to fix it on Cygwin, but now it broke on MinGW in turn. Don't think too hard about it and just remove the code. (vo.c already prints the video rectangle anyway.)
* options: hide encoding AO/VO in help outputwm42013-07-211-0/+1
| | | | | These can't be used manually. Encoding is enabled with -o instead, and the encoding AO/VO is selected using internal mechanisms.
* options: use new code for parsing --vowm42013-07-213-143/+77
| | | | | | | | | Nothing should change from user perspective. mpv --vo=opengl:help now works. Remove the vo_opengl inline help text. The new code can list option names for you, but that's it. Refer to the manpage if you have trouble.
* cocoa_common: fix regression in draggable state computationStefano Pigozzi2013-07-211-0/+1
| | | | Regression introduced in 8fb064de5. Prevented the OSC from working correctly.
* cocoa_common: fix styleStefano Pigozzi2013-07-211-2/+2
|
* cocoa_common: move tracking area setup to updateTrackingAreasStefano Pigozzi2013-07-211-14/+13
| | | | This makes the tracking area work when going in and out of fullscreen.
* x11: add key modifiers to mouse button eventswm42013-07-211-13/+19
|
* w32_common: show the cursor in the window borderJames Ross-Gowan2013-07-212-6/+22
| | | | | | | | | | | | | | | | | | When the cursor was in the window border, it could be hidden but it wouldn't appear again, since mpv doesn't process mouse input there. The code used ShowCursor, which is a horrid stateful API designed for mouseless Win16 systems that incremented or decremented a global counter to keep track of how many applications needed to display a special cursor (like a busy cursor.) Replace that with a simple flag, handle WM_SETCURSOR and use SetCursor(NULL) to hide the mouse cursor, but only when the mouse is in the client area. DefWindowProc will set the correct cursor on the border as long as it isn't hidden with ShowCursor. PowerPoint also uses SetCursor(NULL) to hide the cursor when showing a presentation, so it's probably safe. See http://blogs.msdn.com/b/oldnewthing/archive/2009/12/17/9937972.aspx
* cocoa_common: handle keyboard modifiers for mouse eventsStefano Pigozzi2013-07-211-47/+51
|
* Merge remote-tracking branch 'michaelforney/master'Alexander Preisinger2013-07-201-2/+11
|\
| * 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.
* | cocoa_common: make the fullscreen transition only when necessaryStefano Pigozzi2013-07-201-5/+16
| | | | | | | | | | This makes the cocoa backend follow more closely the new fullscreen semantics added in c4b08a9a.
* | cocoa_common: use a tracking area to handle mouse eventsStefano Pigozzi2013-07-201-33/+52
| | | | | | | | | | | | | | | | | | This change which also flipse the coordinate system of the view, greatly simplifies the mouse event handling code. There are still some uglities mostly related to the cursor visibility code. For instance the core doesn't show the cursor when it receives a mouse leave event.
* | cocoa_common: fix typo in commentStefano Pigozzi2013-07-201-1/+1
| | | | | | | | Surely it's copy pasta's fault.
* | cocoa_common: implement MP_MOUSE_LEAVE notificationsStefano Pigozzi2013-07-201-0/+2
| | | | | | | | | | This is needed for the OSC. At the moment I'm sending a notification for any mouse movement outside of the video surface. This might be overkill.
* | cocoa_common: implement conditional video draggingStefano Pigozzi2013-07-201-14/+30
| | | | | | | | | | | | This was more roundabout than expected, since it looks like the framework caches isMovabileByWindowBackground so in mpv's case it's needed to set it with setMovableByWindowBackground.
* | direct3d: Fixes format string that assumed sizeof(LONG) == sizeof(long)Diogo Franco (Kovensky)2013-07-201-1/+2
|/
* wayland: use a unified struct for the stateAlexander Preisinger2013-07-183-297/+283
| | | | | | | | | | 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-182-7/+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-1810-80/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* vo: remove aspdat.asp memberwm42013-07-182-3/+1
| | | | | | This was bad, because it was the only aspdat member updated by vo_get_src_dst_rects() instead of vo_reconfig(). Now it isn't accessed anymore, so remove it.
* gl_video: add support for more rgb formatswm42013-07-182-56/+119
| | | | | | | | | | | | | | | Until now, only formats directly supported by OpenGL were supported. This excludes various permutations of 8-bit RGB[A|0]. But we can simply permutate the color channels in the shader, so do that. This also adds support for all these weird RGB0 formats. Note that we could use libavutil's pixfmt list instead of the mp_packed_formats array, but trying to decrypt the pixfmt info would probably end in pain, so this array with duplicated information is actually better and shorter. Note: I didn't actually test whether the alpha components are reproduced correctly with alpha formats.
* sws_utils: don't recursively include libswscale headerwm42013-07-181-0/+1
| | | | Add libswscale includes where they are actually needed instead.
* vo_x11: use new swscale wrapperwm42013-07-181-28/+20
|
* vo_x11: remove weird inactive codewm42013-07-181-15/+0
| | | | | | | | | | | | | | | | | | | | I guess this code was supposed to handle cases like drawing RGBA as ARGB by offsetting it by 1 byte. The code didn't make any sense, though. It used to make sense before mpv switched internal pixel formats from FourCCs to a simple enum. With the FourCCs, "fmt | 128" selected the big endian version of a format. Of course this doesn't work this way with the new pixel formats. It just so happens that there are no formats with whose values match IMGFMT_RGB32|128 or IMGFMT_BGR32|128, so this code was inactive. All involved pixel formats seem to play fine on my setup (though it's little endian only), and the code strictly matches the mpv pixel formats against the format of the X image, so I'm not quite sure why this code was there in the first place. The original commit that added this was b333ae1 (svn 21602): Support for different endianness on client and server with -vo x11
* video: redo how colorspaces are handledwm42013-07-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of handling colorspaces with VFCTRLs/VOCTRLs, make them part of the normal video format negotiation. The colorspace is passed down like other video params with config/reconfig calls. Forcing colorspaces (via the --colormatrix options and properties) is handled differently too: if it's changed, completely reinit the video chain. This is slower and requires a precise seek to the same position to perform an update, but it's simpler and less bug-prone. Considering switching the colorspace at runtime by user-interaction is a rather obscure feature, this is a good change. The colorspace VFCTRLs and VOCTRLs are still kept. The VOs rely on it, and would have to be changed to get rid of them. We'll do that later, and convert them incrementally instead of in one go. Note that controlling the output range now always works on VO level. Basically, this means you can't get vf_scale to output full-range YUV for whatever reason. If that is really wanted, it should be a vf_scale option. the previous behavior didn't make too much sense anyway. This commit fixes a few bugs (such as playing RGB video and converting that to YUV with vf_scale - a recent commit broke this and forced the VO to display YUV as RGB if possible), and might introduce some new ones.
* wayland: early aspect calculation in vo_configAlexander Preisinger2013-07-163-7/+27
| | | | | | | | | | | | 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: use default fullscreen methodAlexander Preisinger2013-07-161-1/+1
| | | | | I misunderstood how the different methods work and if we set the size accordingly to the wayland configure event then METHOD_DEFAULT is what we want.
* w32_common: don't use aspdat.asp for aspectwm42013-07-161-1/+2
| | | | | | | | aspdat.asp is a problem, because it's updated when the VO calls vo_get_src_dst_rects(). Nothing guarantees that the value has been updated when the w32 code accesses it. Instead, use the aspect vo_w32_config() was called with.
* Merge branch 'remove_old_demuxers'wm42013-07-141-1/+1
|\ | | | | | | | | | | | | | | The merged branch doesn't actually just remove old demuxers, but also includes a branch of cleanups and some refactoring. Conflicts: stream/stream.c
| * core: change open_stream and demux_open signaturewm42013-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | This removes the dependency on DEMUXER_TYPE_* and the file_format parameter from the stream open functions. Remove some of the playlist handling code. It looks like this was needed only for loading linked mov files with demux_mov (which was removed long ago). Delete a minor bit of dead network-related code from stream.c as well.
* | cocoa_common: change video size when changing screen DPIStefano Pigozzi2013-07-101-0/+8
|/ | | | | This improves the situation when moving a window from screens with different DPIs.
* Merge remote-tracking branch 'origin/low_quality_intel_crap'Martin Herkt2013-07-082-14/+17
|\ | | | | | | | | Conflicts: video/out/gl_video_shaders.glsl
| * Merge branch 'master' into low_quality_intel_crapwm42013-04-3030-3290/+3587
| |\ | | | | | | | | | | | | | | | Conflicts: video/out/gl_video_shaders.glsl video/out/vo_opengl.c
| * | vo_opengl: avoid texture arrays for compatibility with Intel low quality crapwm42013-03-052-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a0b43a1 changed textures to an array, because additional per-texture information was needed and managing this as array is more elegant. This broke playback on Windows with Intel drivers (window shows green video, even though subtitles/OSD work correctly). So change it back to make it work again. Affected driver: Intel(R) HD Graphics 3000 9.17.10.2932
* | | dither: don't use long doublewm42013-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes compilation with broken libcs, like on Cygwin. C99 absolutely requires long double and associated functions like expl, even if long double is double. But newlib (used by cygwin) omits declaration for these if long double is equivalent to double. The extra precision is not needed here, so remove it to make life easier for the single person using mpv with cygwin.
* | | core: remove mp_fifo leftoverswm42013-07-043-3/+0
| | |
* | | wayland: remove mp_fifo headerAlexander Preisinger2013-07-031-1/+0
| | |
* | | wayland: fix typoAlexander Preisinger2013-07-031-1/+1
| | |
* | | wayland: remove unused membersAlexander Preisinger2013-07-031-2/+0
| | |
* | | wayland: remove mp_fifoAlexander Preisinger2013-07-021-7/+7
| | |
* | | wayland: implement MOUSE_LEAVEAlexander Preisinger2013-07-021-0/+2
| | |
* | | core: cleanup more mp_fifo leftoverswm42013-07-025-34/+33
| | | | | | | | | | | | Now only the OSX and Wayland parts are using this.
* | | core: remove mp_fifo indirectionwm42013-07-022-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason mp_fifo specifically handled double clicks, and other than that was a pointless wrapper around input.c functionality. Move the double click handling into input.c, and get rid of mp_fifo. Add some compatibility wrappers, because so much VO code uses these functions. Where struct mp_fifo is still used it's just a casted struct input_ctx.
* | | input: require VOs to send key up events, redo input key lookupwm42013-07-026-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making key up events implicit was sort-of a nice idea, but it's too tricky and unreliable and makes the key lookup code (interpret_keys()) hard to reason about. See e.g. previous commit for subtle bugs and issues this caused. Make key-up events explicit instead. Add key up events to all VOs. Any time MP_KEY_STATE_DOWN is used, the matching key up event must use MP_KEY_STATE_UP. Rewrite the key lookup code. It should be simpler and more robust now. (Even though the LOC increases, because the new code is less "compact".)
* | | w32_common: prevent display power managementJames Ross-Gowan2013-06-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Handling SC_MONITORPOWER doesn't seem to prevent the screen from dimming. The recommended way to do this in Windows XP and Vista is to call SetThreadExecutionState with ES_DISPLAY_REQUIRED. Windows 7 also has the PowerCreateRequest/PowerSetRequest/PowerClearRequest APIs but they're probably too complicated for this task.
* | | w32_common: prevent that window dragging and mouse input interferewm42013-06-291-1/+1
| | |
* | | w32_common: refactor mouse button code, handle mouse up eventswm42013-06-291-31/+39
| | | | | | | | | | | | | | | Instead of sending a single event on click, send both down and up events.
* | | input: trigger mouse_leave key bindings if mouse leaves mouse areawm42013-06-291-2/+5
| | | | | | | | | | | | | | | | | | Also, implement mouse leave events for X11. But evne on other platforms, these events will be generated if mouse crosses a section's mouse area boundaries within the mpv window.
* | | input: handle mouse movement differentlywm42013-06-294-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |