summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: don't require "refresh" seek for --keep-openwm42013-10-021-7/+1
| | | | | | | | | | | | | | | | | | | | | Seeking normally resets the VO and throws away the currently displayed frame, so if you seek outside the video with --keep-open enabled, the window would normally be "stuck" and not redraw properly, because there is no source video frame that could be redrawn. To deal with this, a precise seek to the position of the last displayed video frame was issued. This usually worked, but it can fail for formats where seeking is broken or not possible (consider reading from a pipe). Fix this by changing the semantics for vo_seek_reset(): now the video frame is remembered even after seeking. Note that this changes behavior a little when trying to seek outside of a file with --keep-open enabled. Since no actual seek is done anymore, the video will remain "frozen" on the previous position, and you can't unpause or framestep to see the video between current position and actual end of the video. If users complain, I might revert this commit.
* vo_vdpau: don't blank screen on VOCTRL_RESETwm42013-10-021-16/+35
| | | | | | | | | | | vo_vdpau is the only VO which implements VOCTRL_RESET. Redrawing the last output frame is hard, because the output could consist of several source video frames with certain types of post-processing (deinterlacing). Implement redrawing as special case by keeping the previous video frames aside until at least one new frame is decoded. This improves the previous commit, but is separate, because it's rather complicated.
* video/out: always support redrawing VO window at any pointwm42013-10-028-15/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before, a VO could easily refuse to respond to VOCTRL_REDRAW_FRAME, which means the VO wouldn't redraw OSD and window contents, and the player would appear frozen to the user. This was a bit stupid, and makes dealing with some corner cases much harder (think of --keep-open, which was hard to implement, because the VO gets into this state if there are no new video frames after a seek reset). Change this, and require VOs to always react to VOCTRL_REDRAW_FRAME. There are two aspects of this: First, behavior after a (successful) vo_reconfig() call, but before any video frame has been displayed. Second, behavior after a vo_seek_reset(). For the first issue, we define that sending VOCTRL_REDRAW_FRAME after vo_reconfig() should clear the window with black. This requires minor changes to some VOs. In particular vaapi makes this horribly complicated, because OSD rendering is bound to a video surface. We create a black dummy surface for this purpose. The second issue is much simpler and works already with most VOs: they simply redraw whatever has been uploaded previously. The exception is vdpau, which has a complicated mechanism to track and filter video frames. The state associated with this mechanism is completely cleared with vo_seek_reset(), so implementing this to work as expected is not trivial. For now, we just clear the window with black.
* ao_coreaudio: fetch device name only for verbose log levelStefano Pigozzi2013-10-011-6/+8
| | | | | The previous code fetched the device name regardless of log level and then only printed it if log level was verbose.
* ao_jack: don’t force exact client nameMartin Herkt2013-09-301-1/+1
| | | | | | | | Trying to connect multiple mpv clients to JACK with the JackUseExactName option would fail unless the user manually specifies a unique client name. This changes the behavior to automatically generate a unique name if the requested one is already in use.
* x11: remove colormap code, always request TrueColor visualswm42013-09-303-164/+17
| | | | | | | | | | | | | | | | | | | | vo_x11 had a clever trick to implement a video equalizer: it requested a DirectColor visual. This is a X11 mechanism which allows you to specify a lookup table for each color channel. Effectively, this is a safe override for the graphic card's gamma ramp. If X thinks the window deserves priority over other windows in the system, X would temporarily switch the gamma ramp so that DirectColor visuals can be displayed as the application intends. (I'm not sure what the exact policy is, but in practice, this meant the equalizer worked when the mouse button was inside the window.) But all in all, this is just lots of useless code for a feature that is rarely ever useful. Remove it and use the libswscale equalizer instead. (This comes without a cost, since vo_x11 already uses libswscale.) One worry was that using DirectColor could have made it work better in 8-bit paletted mode. But this is not the case: there's no difference, and in both cases, the video looks equally bad.
* vf_scale: factor out libswscale equalizer controlwm42013-09-303-23/+34
| | | | Will be used by vo_x11.
* Remove completely outdated AUTHORS filewm42013-09-302-1117/+2
| | | | | | | | | | | | | | | | | | | | | | | | Considering that we use version control, maintaining an AUTHORS file doesn't make much sense, and indeed it was barely touched since the time mplayer2 forked from MPlayer. None of the contributors to mplayer2 or mpv are listed in this file (even uau's work is not appropriately reflected, despite having an entry in this file). I'm removing this file because it's obviously pointless to keep around, and moreover it's misleading. In theory removing this file might be questionable: the git log reaches back into CVS and SVN times, which don't have separate committer and author fields for each comment. The commit messages could be incomplete and not mention the original author, while the AUTHORS file somehow could. I doubt this is a real concern, since you can always reconstruct the original AUTHORS file from git. Another concern is that this could be interpreted as disrespectful to the people mentioned in this file; but it isn't meant to be disrespectful. Also point out a slight irregularity in the Copyright file.
* mplayer: fix looping of very short fileswm42013-09-293-7/+19
| | | | | | | | | | | | | | | Commit 884c179 attempted to make it possible to skip backwards through the playlist, even for files which fail to intitialize, or play for a very short time. This was also used to prevent mpv from looping forever and doing nothing if --loop=inf is used, and no file in the playlist is playable. This broke looping of very short files, because mpv was assuming that this case happened. But there are legitimate use cases. Fix this by making the looping case special. Instead of checking whether playback was "very short", check whether something could be decoded and displayed/played. If yes, allow looping.
* vaapi: remove non-VLD entrypointswm42013-09-291-6/+2
| | | | | These probably don't work. libavcodec doesn't seem to support them, and neither did the original mplayer-vaapi patch.
* vaapi: fix non-sense conditionwm42013-09-291-1/+1
| | | | Attempting signed comparison on unsigned value.
* vaapi: fix inverted conditionwm42013-09-291-2/+2
| | | | | | How embarrassing. This could make --hwdec=vaapi-copy as well as screenshots with vo_vaapi randomly fail. Regression since commit b8382aa.
* cocoa_common: call gl_clear indirectlyStefano Pigozzi2013-09-283-2/+23
| | | | | | | glClear needs GL headers and we don't want those in `cocoa_common`. Create a callback in `gl_cocoa` and register it `cocoa_common`. Fixes #264
* cocoa_common: fix deadlockStefano Pigozzi2013-09-281-5/+7
| | | | | | | After rebasing my dev branch it turned out that the code deadlocked on recursive calls of `vo_control`. Make the locking code a little bit smarter by making always skip locking/unlocking if we are executing a chunck of code that is already synchronized with `dispatch_sync`.
* cocoa_common: report pixels instead of points during mouse movementStefano Pigozzi2013-09-281-5/+15
| | | | | | | This fixes the position reporting on retina displays. Doesn't make any difference on normal displays where 1px = 1pt. Fixes: #260
* cocoa_common: split the code, refactoring and cleanupsStefano Pigozzi2013-09-2810-515/+722
| | | | | | | | | Split the code to several files. The GUI elements now each have they own files and private state. The original code was a mess to respect the retarded mplayer convention of having everything in a single file. This commit also seems to fix the long running bug of artifacts showing randomly when going fullscreen using nVidia GPUs.
* osc: add options to show OSC only when FS/windowedChrisK22013-09-271-2/+12
| | | | | | The boolean-options showWindowed and showFullscreen can now be set in plugin_osc.conf to control the behaviour. enhancement for #262
* osx: fix buildwm42013-09-271-2/+2
| | | | | | Or at least I hope it fixes it, since I can't test. Broken by commit 0d90dd0.
* network: add options to control TLS verificationwm42013-09-274-0/+17
|
* vaapi: make vaDeriveImage() less verbosewm42013-09-271-1/+1
| | | | | This can just be not supported, so making it look like a real error doesn't make much sense.
* vaapi: check image format in va_surface_upload()wm42013-09-273-6/+9
| | | | Just for robustness. Also print a warning in vo_vaapi if this happens.
* vaapi: potentially make reading surfaces back to system RAM fasterwm42013-09-274-33/+64
| | | | | | | | Don't allocate a VAImage and a mp_image every time. VAImage are cached in the surfaces themselves, and for mp_image an explicit pool is created. The retry loop runs only once for each surface now. This also makes use of vaDeriveImage() if possible.
* input: translate mouse position to OSD space earlywm42013-09-274-18/+5
| | | | | | | | | | | | | | Until now, mouse positions were just passed to the core as-is, even if the mouse coordinates didn't map to any useful coordinate space, like OSD coordinates. Lua scripting (used by the OSC, the only current user of mouse input) had to translate mouse coordinates manually to OSD space using mp_get_osd_mouse_pos(). This actually didn't work correctly in cases mouse coordinates didn't map to OSD (like vo_xv): the mouse coordinates the OSC got were correct, but input.c was still expecting "real" mosue coordinates for mouse areas. Fix this by converting to OSD coordinates before passing the mouse position to the core.
* input: handle MOUSE_LEAVE speciallywm42013-09-271-0/+8
| | | | | | Do this so that MOUSE_LEAVE can't be combined with other keys. (E.g. keep 'w' pressed, then move the mouse outside of the mpv window; it will print a warning what w-MOUSE_LEAVE is not mapped.)
* input: more mp_msg conversionwm42013-09-273-64/+57
| | | | | | | | It appears the last run missed all mp_tmsg(). Since the command parser also prints messages, it needs a new parameter to pass a log context. We go the easy way and just require the input_ctx to be passed, and use its mp_log.
* matroska: prevent uids from being dereferenced when NULLBen Boeckel2013-09-271-5/+5
| | | | | | The old code prevented it since uids being NULL makes a 0 talloc length. Now that we're iterating over a specific length, NULL can be dereferenced.
* osc: Prevent OSD style options from messing with the OSC stylesChrisK22013-09-261-18/+30
| | | | Should fix #259
* matroska: fix uninitialized memory accesses with ordered chaptersBen Boeckel2013-09-263-1/+3
| | | | | | | There is uninitialized memory access if the actual size isn't passed along. In the worst case, this can cause a source to be loaded against the uninitialized memory, causing a false count of found versus required sources, preventing the "Failed to find ordered chapter part" message.
* osd_libass: add "Default" dummy stylewm42013-09-263-2/+11
| | | | | | This is pretty much a hack for the OSC. It will allow it to rely on a somewhat predictable style, instead of having to overwrite all user OSD settings manually with override tags.
* video: let sh_video->disp_w/h always be container sizewm42013-09-262-8/+9
| | | | | | | Nothing really accesses it. Subtitle initialization actually does in a somewhat meaningful way, but there container size is probably fine, as subtitles were always initialized before the first video frame was decoded.
* video: let sh_video->aspect always be container aspect ratiowm42013-09-264-20/+33
| | | | | | | Now writing -1 to the 'aspect' property resets the video to the auto aspect ratio. Returning the aspect from the property becomes a bit more complicated, because we still try to return the container aspect ratio if no frame has been decoded yet.
* vd: move aspect calculation to a functionwm42013-09-263-24/+25
| | | | | | | | This function would probably be useful in other places too. I'm not sure why vd.c doesn't apply the aspect if it changes size by less than 4 pixels. Maybe it's supposed to avoid ugly results with bad scalers if the difference is too small to be noticed normally.
* vd: remove some dead codewm42013-09-261-14/+4
| | | | | As of now, this function is called only after decoding a full, valid video frame, so the image parameters should be reliable.
* Add the on-screen-controllerChrisK22013-09-266-0/+1183
| | | | Signed-off-by: wm4 <wm4@nowhere>
* Add initial Lua scripting supportwm42013-09-2622-3/+1238
| | | | | | | | | | | | | | | | | | | | | | This is preliminary. There are still tons of issues, and any aspect of scripting may change in the future. I decided to merge this (preliminary) work now because it makes it easier to develop it, not because it's done. lua.rst is clear enough about it (plus some sarcasm). This requires linking to Lua. Lua has no official pkg-config file, but there are distribution specific .pc files, all with different names. Adding a non-pkg-config based configure test was considered, but we'd rather not. One major complication is that libquvi links against Lua too, and if the Lua version is different from mpv's, you will get a crash as soon as libquvi uses Lua. (libquvi by design always runs when a file is opened.) I would consider this the problem of distros and whoever builds mpv, but to make things easier for users, we add a terrible runtime test to the configure script, which probes whether libquvi will crash. This is disabled when cross-compiling, but in that case we hope the user knows what he is doing.
* Fix previous commitwm42013-09-252-4/+4
| | | | | | | This time it broke because I didn't actually test compiling vo_vaapi.c, and it was using a macro from mp_image.h, which implicitly assumed FFALIGN was available. Screw that too, and copy the definition of ffmpeg's FFALIGN to MP_ALIGN_UP, and move these macros to mp_comnon.h.
* vaapi: fix compilation with Libavwm42013-09-253-6/+5
| | | | | | | | | | | The code using FFSWAP was moved from vo_vaapi.c to vaapi.c, which didn't include libavutil/common.h anymore, just libavutil/avutil.h. The header avutil.h doesn't include common.h recursively in Libav, so it broke there. Add FFSWAP as MPSWAP in mp_common.h (copy pasted from ffmpeg) to make sure this doesn't happen again. (This kind of stuff happens all too often, so screw libavutil.)
* options: allow selecting the libass shaperwm42013-09-254-0/+16
| | | | | | I'm using the word "languages" instead of "scripts" in the manpage, but I think that's easier to understand with a smaller amount of descriptions.
* options: make --ass-hinting a choice, instead of using magic numberswm42013-09-253-8/+14
| | | | | options.c still doesn't use the constants defined by the libass headers, but it's still better than exposing those to the user directly.
* configure: make the pdflatex check use the tempdirMartin Herkt2013-09-251-2/+1
|
* configure: improve pdflatex checkMartin Herkt2013-09-251-2/+6
|
* vaapi: allow GPU read-back with --hwdec=vaapi-copywm42013-09-255-4/+114
| | | | | | | | | | | | | | This code is actually quite inefficient: it reuses the (slow, simple) screenshot code. It uses an inefficient method to read the image (vaGetImage() instead of vaDeriveImage()), allocates new memory for each frame that is read, and it tries all image formats again each time. Also, in my tests it always picked NV12 as image format, which is not ideal if you actually want to filter the video, and vo_xv can't handle this format without conversion either. However, a user confirmed that it worked for him, so everything is fine.
* vd_lavc: allow process_image to change image formatwm42013-09-252-18/+21
| | | | | | | | | | | | | | This will allow GPU read-back with process_image. We have to restructure how init_vo() works. Instead of initializing the VO before process_image is called, rename init_vo() to update_image_params(), and let it update the params only. Then we really initialize the VO after process_image. As a consequence of these changes, already decoded hw frames are correctly unreferenced if creation of the filter chain fails. This could trigger assertions on VO uninitialization, because it's not allowed to reference hw frames past VO lifetime.
* vaapi: add vf_vavpp and use it for deinterlacingxylosper2013-09-2513-524/+1145
| | | | | | | | Merged from pull request #246 by xylosper. Minor cosmetic changes, some adjustments (compatibility with older libva versions), and manpage additions by wm4. Signed-off-by: wm4 <wm4@nowhere>
* sd_ass: minor simplificationwm42013-09-241-14/+8
| | | | | There shouldn't be any functional changes. Just reduce the amount of pointless temporary variables.
* sd_ass: remove dead codewm42013-09-241-48/+0
| | | | | | This code was made inactive some months ago. At this time it wasn't entirely clear whether this code was still needed, but now I'm pretty sure it isn't. Even if it is, it didn't work anymore.
* command: fix short buffer when handling of long property nameswm42013-09-241-6/+4
| | | | | | This wasn't enough and could lead to a cut off message shown on OSD. Just make it dynamic, since we already use dynamic memory allocation at this point anyway.
* wayland: remove outdated commentAlexander Preisinger2013-09-241-2/+0
|
* wayland: remove moving window by grabbingAlexander Preisinger2013-09-241-4/+0
| | | | | | Moving the window was convenient but generates a MOUSE_LEAVE event which it shouldn't. Now we remove it, because it is still possible to move the window in weston with MOD+BTN0.
* .gitignore: add pdflatex output filesMartin Herkt2013-09-231-1/+5
|
* sub/ass_mp: remove superfluous message prefixesMartin Herkt2013-09-231-3/+2
|
* install: don’t force append /mpv to docdirMartin Herkt2013-09-232-5/+5
|
* win32: edit resource files, in particular set CompanyNamewm42013-09-232-5/+5
| | | | | | | Setting CompanyName (probably) helps with issue #256. Update some other fields as well, because why not. (They're full of MPlayer remnants.)
* demux: don't print "Clip info:" line if there are no tagswm42013-09-231-1/+1
|
* ao_oss: add support for SNDCTL_DSP_RESET and use it when pausingPaul B Mahol2013-09-231-0/+6
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: wm4 <wm4@nowhere>
* mplayer: attempt to make playback resume work with DVD/BDwm42013-09-228-19/+27
| | | | | | | | | | | | | | | | The problem with DVD/BD and playback resume is that most often, the filename is just "dvd://", while the actual path to the DVD disk image is given with --dvd-device. But playback resume works on the filename only. Add a pretty bad hack that includes the path to the disk image if the filename starts with dvd://, and the same for BD respectively. (It's a bad hack, but I want to go to bed, so here we go. I might revert or improve it later, depending on user feedback.) We have to cleanup the global variable mess around the dvd_device. Ideally, this should go into MPOpts, but it isn't yet. Make the code paths in mplayer.c take MPOpts anyway.
* network: fix rtsp playbackwm42013-09-225-2/+35
| | | | | | | | | | | | | | By default, libavformat uses UDP for rtsp playback. This doesn't work very well. Apparently the reason is that the buffer sizes libavformat chooses for UDP are way too small, and switching to TCP gets rid of this issue entirely (thanks go to Reimar Döffinger for figuring this out). In theory, you can set buffer sizes as libavformat options, but that doesn't seem to help. Add an option to select the rtsp transport, and make TCP the default. Also remove an outdated comment from stream.c.
* stream_lavf: print lavf options that could not be setwm42013-09-221-0/+6
| | | | | | | | | Mainly for debugging. Usually, we just set options for all possible protocols, and we can't really know whether a certain protocol is used beforehand. That's also the reason why avio_open2() takes a dictionary, instead of letting the user set options directly with av_opt_set(). Or in other words, we don't know whether an option that could be set is an error or not, thus we print the messages only at verbose level.
* command: when changing volume while muted, show an extra message on OSDwm42013-09-211-1/+2
| | | | | So nobody has to wonder why everything is silent, even if they raise the volume.
* command: when changing a property, allow showing an extra OSD messagewm42013-09-214-33/+50
| | | | | | | | | | This is for properties that normally show a bar, and thus do not show an OSD message (as per classic mplayer behavior). Setting an extra_msg allows showing an OSD message anyway, except if OSD messages are explicitly suppressed. This refactors the whole show_property_osd() function a bit, and replaces the weird sep field with a more general method.
* m_property: add a way to switch on property values in property expansionwm42013-09-202-6/+24
| | | | | | | | | | Allows for example: --status-msg='${?pause==