summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* player: fix framestep over timeline segment boundarieswm42015-01-261-0/+2
| | | | | | | | | | | This was subtly broken by commit a937ba20. Instead of framestepping over the timeline segment boundary, it would just unpause playback, because seeking now resets mpctx->step_frames. This was especially apparent when doing something like "mpv *.jpg --merge-files". Fix by restoring the step_frames field specifically if the seek is done for switching segment boundaries. Hopefully the number fields which need such an exception on seeking won't grow and turn this code into a mess.
* vo: handle very long frame durations with smoothmotion enabledwm42015-01-261-1/+1
| | | | | | | | | | | | | | | With mf://, rather long frame durations are common. By default, one frame takes 1 second. This causes the if branch changed with this commit to always being taken, which in turn leads to the player not being woken up correctly. (As a consequence, it "freezes" by waiting for events that never come, and moving the mouse cursor over the window will wake it up again and advance video.) Obviously, the code should account for how long the video frame takes. The code is probably still not fully correct, but for now this fixes the issue at hand. Fixes #1521.
* options: list correct default value for --screenshot-templatewm42015-01-262-1/+2
| | | | | | Make the default value part of the option metadata, instead of doing this in the screenshot code. Makes more sense with --list-options and the command.c option metadata properties.
* msg: add --log-file optionwm42015-01-266-1/+32
| | | | | | | | | This allows getting the log at all with --no-terminal and without having to retrieve log messages manually with the client API. The log level is hardcoded to -v. A higher log level would lead to too much log output (huge file sizes and latency issues due to waiting on the disk), and isn't too useful in general anyway. For debugging, the terminal can be used instead.
* manpage: document 'A' keywm42015-01-261-0/+3
| | | | Of course this was forgotten in commit 189087c.
* manpage: fix typoDiogo Franco (Kovensky)2015-01-261-1/+1
|
* manpage: fix smoothmotion-threshold value rangewm42015-01-261-1/+1
|
* vo_opengl: drop sRGB framebuffer detectionwm42015-01-262-9/+1
| | | | | We've stopped using them some time ago (we're doing things manually instead).
* options: make --hls-bitrate=max the defaultwm42015-01-262-2/+3
| | | | | | | The previous default ("no") seemed to be equivalent to "min" in practice (though it might depend on the website, which is even worse). Better just select the best stream by default.
* manpage: describe some more config directory artifactswm42015-01-261-9/+27
|
* input.conf: bind 'A' to cycling aspect ratioswm42015-01-261-0/+2
| | | | | | | | | | Apparently broken files are popular enough that this is still needed. It's relatively often asked on the IRC channel, and I also found it on the archwiki mpv page. The list of aspect ratios is taken from the archwiki page, with "16:10" removed (because I doubt there are actually files with this aspect ratio).
* video/out: cosmetics: rename VO_EVENT_ICC_PROFILE_PATH_CHANGEDwm42015-01-264-7/+7
| | | | | Remove the "PATH" bit, because VOCTRL_GET_ICC_PROFILE returns an in- memory profile, and not a path. (This was changed a while ago.)
* vo_opengl, x11: implement icc-profile-autowm42015-01-263-5/+37
| | | | | | | | | | | | | | | | | This queries the _ICC_PROFILE property on the root window. It also tries to reload the ICC when it changes, or if the mpv window changes the monitor. (If multiple monitors are covered, mpv will randomly select one of them.) The official spec is a dead link on freedesktop.org, so don't blame me for any bugs. Note that this assumes that Xinerama screen numbers match the way mpv enumerates the xrandr monitors. Although there is some chance that this matches, it most likely doesn't, and we actually have to do complicated things to map the screen numbers. If it turns out that this is required, I will fix it as soon as someone with a suitable setup for testing the fix reports it.
* vo_opengl: minor changes to ICC update codewm42015-01-262-19/+20
| | | | | | | | | | | | | | | Merge update_icc_profile() into get_and_update_icc_profile() - there's no reason anymore to keep them separate. The former is only called by the latter, and the separation of responsibilities between them is blurry a best. Query the ICC profile only if the corresponding feature is actually enabled. Additionally, change the error behavior of this code. Make loading failure non-fatal, and distinguish between runtime error and unimplemented functionality. Fix a memory leak in gl_lcms.c (although the changes in vo_opengl.c already take care of this, it's just logical and cleaner).
* vo_opengl: update a commentwm42015-01-261-2/+3
| | | | We don't use the hwdec-provided video texture for screenshots anymore.
* vo_opengl: make "mitchell" the hq default filter for downscalingwm42015-01-262-2/+3
| | | | | | | | | | | | | Seems like several people agree that it's a good filter for downscaling. Setting this option by default may also prevent people from accidentally using an unsuitable filter for downscaling by setting "scale" and without being aware of the impliciations (maybe). On the other hand, this change is not strictly backwards compatible for the same reasons. Also, allow disabling this option with scale-down="" (before this, not setting it was the only way to do this - not possible anymore if it's set by default). This is what the change in handle_scaler_opt() does.
* vo_opengl: simplify radius initializationwm42015-01-262-18/+6
| | | | | | | | | | | | | | | Somehow, the default radius for filters with variable radius was set in mp_init_filter(). gl_video.c used NAN as default value for the radius, which would make the filter use the default radius. Simplify this, and set the default radius directly in the gl_video options. It also makes the options easier to understand, because the default value listed in --vo=opengl:help actually shows the default value. Remove the function can_use_filter_kernel(), because it doesn't set a radius if none is set. The function is worthless anyway (something about making filter_kernels.c reusable to other VOs, and trying to deal with the possibility that it could provide filters not supported by vo_opengl.)
* vo_opengl: fancy-downscale affects luma-scaler onlywm42015-01-251-1/+1
|
* ao_pulse: plug a memory leakBen Boeckel2015-01-251-0/+3
|
* lua: do not use math.pow()wm42015-01-251-1/+1
| | | | | It's the first thing that breaks with Lua 5.3. I don't know if there are other failures because I don't care enough.
* vo: fix redraw logicwm42015-01-251-4/+2
| | | | | | | | It actually can and does happen that you want to redraw, even if no image was queued yet. Broken by commit 28582322. Fixes #1510.
* input: fix dangling pointerwm42015-01-251-0/+1
| | | | Removes undefined behavior that showed up as crap when running with -v.
* options: don't list removed optionswm42015-01-251-0/+3
|
* vo_opengl: remove remnants of dropped stereo buffer supportwm42015-01-243-15/+0
|
* vo: generic redraw supportwm42015-01-242-7/+5
| | | | | | | | | | | | | | | | | | | | Usually, a VO must react to VOCTRL_REDRAW_FRAME in order to redraw the current screen correctly if video is paused (this is done to update OSD). But if it's not supported, we can just draw the current image again in the generic vo.c code. Unfortunately, this turned out pretty useless, because the VOs which would benefit from this need to redraw even if there is no image, in order to draw a black screen in --idle --force-window mode. The way redrawing is handled in the X11 common code and in vo_x11 and vo_xv is in the way, and I'm not sure what exactly vo_wayland requires. Other VOs have a non-trivial implementation of VOCTRL_REDRAW_FRAME, which (probably) makes redrawing slightly more efficient, e.g. by skipping texture upload. So for now, no VO uses this new functionality, but since it's trivial, commit it anyway. The vo_driver->untimed case is for forcibly disabling redraw for vo_lavc and vo_image always.
* vo: simplify VOs by adding generic screenshot supportwm42015-01-2415-135/+39
| | | | | | | | | | | At the time screenshot support was added, images weren't refcounted yet, so screenshots required specialized implementations in the VOs. But now we can handle these things much simpler. Also see commit 5bb24980. If there are VOs in the future which can't do this (e.g. they need to write to the image passed to vo_driver->draw_image), this still could be disabled on a per-VO basis etc., so we lose no potential performance advantages.
* ytdl: implement user-agent and cookie overrideswm42015-01-241-5/+34
| | | | | | | | | | | | | | | | For some sites, youtube-dl sends a special user-agent. If we don't send the same user-agent, the server will reject mpv's connection attempt. This was observed with trailers.apple.com. Fix it by forcing the user-agent youtube-dl uses. Some sites set cookies when doing a website access, and require the client to provide these cookies when downloading the actual media. This is needed at least by nicovideo.jp. Fix by adding youtube-dl's cookies to our request headers. Both of these require a very recent youtube-dl version (youtube-dl added the necessary headers a few hours ago). The script still works with older youtube-dl versions, though.
* cocoa: fix fallback for OpenGL 2.1 hardware [2]Stefano Pigozzi2015-01-241-7/+13
| | | | Looks like it fails on context creation, not pixfmt creation.
* cocoa: fix fallback for OpenGL 2.1 hardwareStefano Pigozzi2015-01-241-25/+25
| | | | | | This was previously done in common code but now it's left to backends. Also remove the GL4 stuff since requesting a 3_2_Core context creates a 4.1 context here (wtf).
* video: separate screenshot modeswm42015-01-2313-92/+63
| | | | | | | | | Use different VOCTRLs for "window" and normal screenshot modes. The normal one will probably be removed, and replaced by generic code in vo.c, and this commit is preparation for this. (Doing it the other way around would be slightly simpler, but I haven't decided yet about the second one, and touching every VO is needed anyway in order to remove the unneeded crap. E.g. has_osd has been unused for a long time.)
* input, player: new command for mouse eventxylosper2015-01-234-0/+45
| | | | | | | New command `mouse <x> <y> [<button> [single|double]]` is introduced. This will update mouse position with given coordinate (`<x>`, `<y>`), and additionally, send single-click or double-click event if `<button>` is given.
* vo: fix disabling/enabling smoothmotion at runtimewm42015-01-235-12/+13
| | | | | | | | | | | | | vo.c queried the VO at initialization whether it wants to be updated on every display frame, or every video frame. If the smoothmotion option was changed at runtime, the rendering mode in vo.c wasn't updated. Just let vo_opengl set the mode directly. Abuse the existing vo_set_flip_queue_offset() function for this. Also add a comment suggesting the use of --display-fps to the manpage, which doesn't have anything to do with the rest of this commit, but is important to make smoothmotion run well.
* youtube-dl_mpv.sh: unquote ${video_url}Vítor Galvão2015-01-231-1/+1
|
* manpage: minor changeswm42015-01-235-20/+28
| | | | | | Mostly related to vo_opengl. Fix the opengl lscale option in the qml example too.
* command: export file format as propertywm42015-01-234-5/+20
| | | | | | | | | | | | Repurpose demuxer->filetype for this. It used to be used to print a human readable format description; change it to a symbolic format name and export it as property. Unfortunately, libavformat has its own weird conventions, which are reflected through the new property, e.g. the .mp4 case mentioned in the manpage. Fixes #1504.
* build: remove bogus client API examples buildwm42015-01-235-40/+9
| | | | | | | | | | | The symlink trick made waf go crazy (deleting source files, getting tangled up in infinite recursion... I wish I was joking). This means we still can't build the client API examples in a reasonable way using the include files of the local repository (instead of globally installed headers). Not building them at all is better than deleting source files. Instead, provide some manual instructions how to build each example (except for the Qt examples, which provide qmake project files).
* vf_vavpp: add more deinterlacing algorithmswm42015-01-232-7/+26
| | | | | | These are untested due to lack of hardware. From what I've heard, the drivers are pretty buggy, so it's not clear how well this works, if at all.
* input: handle mixing key press and up/down events betterwm42015-01-231-4/+5
|
* x11: remove unnecessary codewm42015-01-231-3/+0
|
* vo: allow dropping additional frames with smoothmotionwm42015-01-231-6/+6
| | | | | | | | | | | | | The logic disabled framedropping if the frame was interpolated (i.e. the render call is only done to interpolate between the previous frame, and the frame before that). It seems doing this wasn't even necessary, and broke framedrop in smoothmotion mode. In fact, this code did nothing for display with video fps below display fps. It did prevent the framedrop counter from going up, though. So change it so that dropped interpolated frames are never reported. (Doing so can give confusing results, such as dropping 1000s of frames on slow operations like video start or changing filters.)
* vo: cosmeticswm42015-01-231-22/+24
|
* ao_wasapi: fix try_format logic in shared modeJames Ross-Gowan2015-01-231-2/+1
| | | | | | | | | | | | | | | | | The MSDN documentation for IsFormatSupported says a return code of AUDCLNT_E_UNSUPPORTED_FORMAT means the function "succeeded but the specified format is not supported in exclusive mode." This seems to imply that the format is supported in shared mode, and that's what the old code assumed, however try_format would incorrectly return success with some drivers. The remarks section of the documentation contradicts that assumption. It says that in shared mode, if the audio engine does not support the caller-specified format or any similar format, ppClosestMatch is set to NULL and the function returns AUDCLNT_E_UNSUPPORTED_FORMAT. This is the same as in exclusive mode, so treat AUDCLNT_E_UNSUPPORTED_FORMAT the same regardless of opt_exclusive. In shared mode, the format selection code will fall back to the mix format, which should always be supported.
* vo: fix framedrop in normal casewm42015-01-231-1/+2
| | | | | vsync_timed is true if smoothmotion is used. That would mean framedrop is always disabled in the normal case.
* player: some fixes for property notificationxylosper2015-01-232-4/+4
| | | | | | | | | | `core-idle` depends on seeking state `mpctx->restart_complete`, so make `core-idle` notified whenever `seeking` is notified, too. `paused-for-cache` can be changed on MPV_EVENT_CACHE_UPDATE obviously. Finally, `MPV_EVENT_PLAYBACK_RESTART` should be notified after `mpctx->restart_complete` changed.
* vo_opengl: add smoothmotion frame blendingStefano Pigozzi2015-01-238-20/+239
| | | | | | | | | | | | | | | | | | | SmoothMotion is a way to time and blend frames made popular by MadVR. It's intended behaviour is to remove stuttering caused by mismatches between the display refresh rate and the video fps, while preserving the video's original artistic qualities (no soap opera effect). It's supposed to make 24fps video playback on 60hz monitors as close as possible to a 24hz monitor. Instead of drawing a frame once once it's pts has passed the vsync time, we redraw at the display refresh rate, and if we detect the vsync is between two frames we interpolated them (depending on their position relative to the vsync). We actually interpolate as few frames as possible to avoid a blur effect as much as possible. For example, if we were to play back a 1fps video on a 60hz monitor, we would blend at most on 1 vsync for each frame (while the other 59 vsyncs would be rendered as is). Frame interpolation is always done before scaling and in linear light when possible (an ICC profile is used, or :srgb is used).
* youtube-dl_mpv.sh: use curly braces and double quotes consistentlyVítor Galvão2015-01-221-8/+8
|
* filter_kernels: improve a commentwm42015-01-221-3/+2
| | | | It's not true anymore that the size necessarily depends on the radius.
* manpage: vo_opengl: describe how to get lanczos2/lanczos3wm42015-01-221-0/+3
| | | | | | | These aliases were removed in commit 1ec77214. Add a notice to the manpage how to get these back. Apparently, "lanczos2" and "lanczos3" were the only interesting aliases possibly used by someone, so the description is limited to these two.
* vo_opengl: improve terminal messages with lscale suboption errorswm42015-01-221-5/+13
| | | | Make it more apparent what the hell the user did wrong.
* vo_opengl: remove scale-sep and indirect optionsNiklas Haas2015-01-223-39/+13
| | | | | | | | | | | | These are now auto-detected sanely; and enabled whenever it would be a performance or quality gain (which is pretty much everything except bilinear/bilinear scaling). Perhaps notably, with the absence of scale_sep, there's no more way to use convolution filters on hardware without FBOs, but I don't think there's hardware in existence that doesn't have FBOs but is still fast enough to run the fallback (slow) 2D convolution filters, so I don't think it's a net loss.
* filter_kernels: get rid of sinc/lanczos aliasesNiklas Haas2015-01-221-12/+0
| | | | Just set the radius with scale-radius if it's really needed
* vo_opengl: rename all scale options to make more senseNiklas Haas2015-01-223-51/+56
| | | | | This emphasizes the fact that scale is used for *all* image upscaling, with cscale only serving a minor role for subsampled material.
* vo_opengl: switch to nearest neighbour for trivial resamplingNiklas Haas2015-01-222-3/+12
| | | | | | | | | | This is significantly faster for FBOs on most modern GPUs, although it did not result in a huge difference for the video source texture on the sizes I tested. It might be more significant for 1080p or 4K content, so it's worth revisiting this in the future. It also renames SAMPLE_BILINEAR to SAMPLE_TRIVIAL to match the semantics.
* vo_opengl: always prefer indirect scalingNiklas Haas2015-01-222-23/+19
| | | | | | This is better even for non-separable. The only exception is when using bilinear for both lscale and cscale. I've fixed the documentation/comments to make more sense.
* vo_opengl: implement naive anti-ringingNiklas Haas2015-01-224-14/+45
| | | | | | | | This is not quite the same thing as madVR's antiringing algorithm, but it essentially does something similar. Porting madVR's approach to elliptic coordinates will take some amount of thought.
* vo_opengl: unroll ewa_lanczos to avoid looping and unnecessary samplesNiklas Haas2015-01-222-10/+29
| | | | | | | This speeds up performance by a factor of something like 10%, since it omits unnecessary checks. This will also make adding anti-ringing easier.
* vo_opengl: clean up ewa_lanczos codeNiklas Haas2015-01-226-32/+60
| | | | | | This fixes compatibility with GLES 2.0 and makes the code a bit neater in general. It also properly forces indirect scaling for subsampled video regardless of the lscale setting.
* vo_opengl: guarantee correct reinitialization on setting optionswm42015-01-221-0/+1
| | | | | | At least the scale_sep_fbo could have been uninitialized or initialized incorrectly when switching between scalers (e.g. from bilinear to lanczos). Calling check_resize() should take care of this.
* vo_opengl: don't reset unused GL_PACK_... statewm42015-01-221-4/+1
|
* vo_opengl: simplify screenshot codewm42015-01-223-76/+13
| | | | | | | | | | | | | | Instead of reading back the image from textures, keep a reference to the original image, and return that. The main reason this was done this way was that originally, images weren't refcounted, and would be deallocated or overwritten as soon as the VO's draw call returned. But now there isn't really a good reason for this anymore. One possibly _could_ argue that it was better because other code could reuse the image sooner (e.g. for the cache), but on the other hand, the VO runs already on a different thread, and filtering and decoding each run on other threads too, so this argument probably wouldn't hold up.
* vo_vdpau: don't render to an output surface if it could be busywm42015-01-221-6/+6
| | | | | | There was a case when we could have rendered to an output surface while it's still used for display. Not sure why the API doesn't do this automatically.
* video: handle hwdec screenshots differentlywm42015-01-2213-97/+182
| | | | | | | | Instead of converting the hw surface to an image in the VO, provide a generic way to convet hw surfaces, and use this in the screenshot code. It's all relatively straightforward, except vdpau is being terrible. It needs a huge chunk of new code, because copying back is not simple.
* mp_image_pool: allow passing pool=NULL in more placeswm42015-01-221-2/+4
| | | | It's convenient.
*