summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | input: store number of keys, instead of using 0-terminationwm42013-06-291-21/+24
| | |
* | | input: don't keep separate sections for builtin key bindingswm42013-06-291-62/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead mark individual key bindings as builtin. Not sure whether this is conceptually simpler or more complicated. For one, it requires the annoying remove_binds() function to wipe existing bindings instead of just killing the section, on the other hand it gets rid of almost all special handling of builtin vs. normal sections.
* | | 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.
* | | mplayer: don't hide mouse cursor if mouse is inside mouse areawm42013-06-292-1/+5
| | |
* | | input: trigger mouse_leave key bindings if mouse leaves mouse areawm42013-06-295-14/+58
| | | | | | | | | | | | | | | | | | 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.
* | | command: add commands to enable/disable input sectionswm42013-06-294-0/+34
| | | | | | | | | | | | | | | For now, it's mostly for testing. It also might allow to create key binding state machines, but this sounds questionable.
* | | manpage: document input sectionswm42013-06-291-1/+21
| | |
* | | input: handle mouse movement differentlywm42013-06-2911-151/+354
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, mouse movement events emitted a special command ("set_mouse_pos"), which was specially handled in command.c. This was once special-cased to the dvdnav and menu code, and did nothing after libmenu and dvdnav were removed. Change it so that mouse movement triggers a pseudo-key ("MOUSE_MOVE"), which then can be bound to an arbitrary command. The mouse position is now managed in input.c. A command which actually needs the mouse position can use either mp_input_get_mouse_pos() or mp_get_osd_mouse_pos() to query it. The former returns raw window-space coordinates, while the latter returns coordinates transformed to OSD- space. (Both are the same for most VOs, except vo_xv and vo_x11, which can't render OSD in window-space. These require extra code for mapping mouse position.) As of this commit, there is still nothing that uses mouse movement, so MOUSE_MOVE is mapped to "ignore" to silence warnings when moving the mouse (much like MOUSE_BTN0). Extend the concept of input sections. Allow multiple sections to be active at once, and organize them as stack. Bindings from the top of the stack are preferred to lower ones. Each section has a mouse input section associated, inside which mouse events are associated with the bindings. If the mouse pointer is outside of a section's mouse area, mouse events will be dispatched to an input section lower on the stack of active sections. This is intended for scripting, which is to be added later. Two scripts could occupy different areas of the screen without conflicting with each other. (If it turns out that this mechanism is useless, we'll just remove it again.)
* | | command: make raw percent-pos property return fractionswm42013-06-292-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | percent-pos was an integer (0-100). Sometimes higher precision is wanted, but the property is this way because fractional parts would look silly with normal OSD usage. As a compromise, make percent-pos double (i.e. includes fractional parts), but print it as integer. So ${percent-pos} is like an integer, but not ${=percent-pos}.
* | | command: add properties for playlist positionwm42013-06-296-10/+105
| | | | | | | | | | | | | | | playlist-pos can set/get the current playlist index. playlist-count returns the number of entries in the playlist.
* | | cocoa_common: uninit fs window properlyStefano Pigozzi2013-06-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | In fullscreen `s->window` is the windowed window. So freeing that didn't get rid of the FS window and OpenGL view. Fixes #122 [ci skip]
* | | csputils.h: don't recursively include libavcodec headerwm42013-06-283-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | Some functions (avcol_spc_to_mp_csp() etc.) used libavcodec enum types as parameters. Remove these in order to get rid of the avcodec.h include statement. This prevents that avcodec.h is recursively included by dozens of files. Fix mp_image.c, which used the header without explicitly including avcodec.h.
* | | vo_opengl: handle chroma locationwm42013-06-2810-3/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the video decoder chroma location flags and render chroma locations other than centered. Until now, we've always used the intuitive and obvious centered chroma location, but H.264 uses something else. FFmpeg provides a small overview in libavcodec/avcodec.h: ----------- /** * X X 3 4 X X are luma samples, * 1 2 1-6 are possible chroma positions * X X 5 6 X 0 is undefined/unknown position */ enum AVChromaLocation{ AVCHROMA_LOC_UNSPECIFIED = 0, AVCHROMA_LOC_LEFT = 1, ///< mpeg2/4, h264 default AVCHROMA_LOC_CENTER = 2, ///< mpeg1, jpeg, h263 AVCHROMA_LOC_TOPLEFT = 3, ///< DV AVCHROMA_LOC_TOP = 4, AVCHROMA_LOC_BOTTOMLEFT = 5, AVCHROMA_LOC_BOTTOM = 6, AVCHROMA_LOC_NB , ///< Not part of ABI }; ----------- The visual difference is literally minimal, but since videophiles apparently consider this detail as quality mark of a video renderer, support it anyway. We don't bother with chroma locations other than centered and left, though. Not sure about correctness, but it's probably ok.
* | | video: add a new method to configure filters and VOswm42013-06-2817-141/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The filter chain and the video ouputs have config() functions. They are strictly limited to transfering the video size and format. Other parameters (like color levels) have to be transferred separately. Improve upon this by introducing a separate set of reconfig() functions, which use mp_image_params to carry format parameters. This struct contains all image format related parameters from config(), plus additional parameters such as colorspace. Change vf_rotate to use it, as well as vo_opengl. vf_rotate is just an example/test case, but vo_opengl will need it later. The intention is also to get rid of VOCTRL_SET_YUV_COLORSPACE. This information is now handed to the VOs via reconfig(). The getter, VOCTRL_GET_YUV_COLORSPACE, will still be needed though.
* | | mp_image: copy palette only if allocatedwm42013-06-281-1/+2
| | | | | | | | | | | | | | | | | | Normally, we assume that IMGFMT_PAL8 always has a palette allocated in plane 1. But there may be corner cases in ffmpeg where it doesn't (namely pseudo-pal stuff).
* | | vf_rotate: fix params >= 4wm42013-06-281-0/+2
| | |
* | | configure: prefer libquvi 0.4.x over libquvi 0.9.xwm42013-06-281-18/+18
| | | | | | | | | | | | Because 0.4.x is the current series of stable releases.
* | | core: add libquvi 0.9 supportwm42013-06-2810-10/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for libquvi 0.9.x, and these features: - start time (part of youtube URL) - youtube subtitles - alternative source switching ('l' and 'L' keys) - youtube playlists Note that libquvi 0.9 is still in development. Although this seems to be API stable now, it looks like there will be a 1.0 release, which is supposed to be the next stable release and the actual successor of libquvi 0.4.x.
* | | core: rename mplayer.h and quvi.cwm42013-06-286-12/+7
| | | | | | | | | | | | | | | | | | mplayer.h used to be used for much more stuff, but all what is left are quvi related definitions. Rename quvi.c as well to make its purpose clearer.
* | | stream: redo memory streamswm42013-06-284-8/+92
| | | | | | | | | | | | | | | Make memory streams actual streams. This causes fewer weird corner cases and actually allows using demuxers with them.
* | | options: rename --mkv-subtitle-preroll, --dtshdwm42013-06-282-32/+41
| | | | | | | | | | | | We still keep the old names as alias for short-time compatibility.
* | | options: rename --rawvideo to --demuxer-rawvideo, same with --rawaudiowm42013-06-283-37/+41
| | |
* | | options: rename -lavdopts to -vd-lavc, -lavfdopts to -demuxer-lavfwm42013-06-283-104/+98
| | | | | | | | | | | | | | | Also change manpage so that top-level options are documented instead of suboptions. Suboptions still work, but might go away eventually.
* | | options: remove -lavdopts debug suboptionwm42013-06-283-31/+1
| | | | | | | | | | | | This can be set as avopt instead.
* | | dec_sub: fix memory leak when using subtitle codepage conversionwm42013-06-281-0/+1
| | |
* | | dec_sub: don't print sub charset of it's emptywm42013-06-281-1/+1
| | |
* | | configure: fix wasapi0 checksJames Ross-Gowan2013-06-261-6/+6
| | |
* | | cocoa_common: schedule a redraw frame after a non live resizeStefano Pigozzi2013-06-251-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A redraw forces recalculation of panscan and other stuff not accounted for in the resize_redraw codepath. This is actually a hack but works really well in my tests. Thanks @wm4 and @Cpuroast for the idea. Fixes #86 [ci skip]
* | | demux_lavf: add one more AAC mimetypewm42013-06-251-0/+1
| | |
* | | Merge branch 'sub_mess2'wm42013-06-2537-924/+1348
|\ \ \ | | | | | | | | | | | | ...the return.
| * | | DOCS: update tech-overview.txt to reflect some subtitle related changeswm42013-06-251-13/+19
| | | |
| * | | options: add -sub-speed optionwm42013-06-254-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should we actually get into trouble for unproper handling of frame-based subtitle formats, this might be the simplest way to work this around. Also is a bit more intuitive than -subfps, which might use an unknown, misdetected, or non-sense video FPS. Still pretty silly, though.
| * | | dec_sub: add hack to display last MicroDVD subtitle eventwm42013-06-251-0/+11
| | | | | | | | | | | | | | | | The old subreader.c infrastructure handled this in a similar way.
| * | | sub: libguess support for -subcpwm42013-06-253-1/+57
| | | | | | | | | | | | | | | | Actually this is rather disappointing.
| * | | sub: add hack for Libav SRT demuxerwm42013-06-253-1/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, SRT demuxing and display actually happened to work on Libav. But it was using the libavcodec srt converter (which is essentially unmaintained in Libav), and timing postprocessing didn't work. For some background explanations see sd_lavf_srt.c.
| * | | dec_sub: allow postprocessing between decoderswm42013-06-251-14/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, timing and charset recoding postprocessing was applied on packets as they were output by the demuxer, and then passed to the decoders. Make it so that postprocessing can happen after some decoders in special situations.
| * | | dec_sub: change sublist memory allocationwm42013-06-251-10/+9
| | | |
| * | | dec_sub: move code aroundwm42013-06-251-45/+51
| | | |
| * | | demux_libass: do charset conversion by -subcpwm42013-06-251-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old code used to use libass' recoding feature, which is a copy of the old MPlayer code. We dropped that a few commits ago. Unfortunately, this made it impossible to load some subtitle files, like UTF-16 files. Make .ass loading respect -subcp again. We do this by recoding the probe buffer to UTF-8, and then trying to load it normally. (Yep.) Since UTF-16 in particular will effectively half the probe buffer size, double the probe size.
| * | | sub: prevent subtitle conversion if subs are known UTF-8wm42013-06-253-1/+3
| | | | | | | | | | | | | | | | | | | | Currently this happens only in an obscure case (reading UTF-16 files with the old subreader).
| * | | demux_subreader: remove iconv/enca codewm42013-06-251-154/+1
| | | | | | | | | | | | | | | | Not needed anymore, done by dec_sub.c instead.
| * | | sub: add subtitle charset conversionwm42013-06-255-5/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |