summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* command: read the diff if you want to knowwm42017-10-215-1/+56
|
* *** empty log message ***wm42017-10-211-2/+0
|
* demux: replace redundant field with a better redundant fieldwm42017-10-211-8/+7
|
* demux: add a back buffer and the ability to seek into itwm42017-10-215-157/+375
| | | | | | | | | | | | | | | | | | | | | | | | This improves upon the previous commit, and partially rewrites it (and other code). It does: - disable the seeking within cache by default, and add an option to control it - mess with the buffer estimation reporting code, which will most likely lead to funny regressions even if the new features are not enabled - add a back buffer to the packet cache - enhance the seek code so you can seek into the back buffer - unnecessarily change a bunch of other stuff for no reason - fuck up everything and vomit ponies and rainbows This should actually be pretty usable. One thing we should add are some properties to report the proper buffer state. Then the OSC could show a nice buffer range. Also configuration of the buffers could be made simpler. Once this has been tested enough, it can be enabled by default, and might replace the stream cache's byte ringbuffer. In addition it may or may not be possible to keep other buffer ranges when seeking outside of the current range, but that would be much more complex.
* demux: optimize seeks within readahead cacheAman Gupta2017-10-211-12/+104
| | | | | If a suitable keyframe cannot be found in each stream's readahead cache, fallback to a regular seek.
* demux: improvements to previous commitswm42017-10-202-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | More the ignore_eof field to the internal demux_stream struct. This is relatively messy, because the internal struct exists only once the stream is created, and after that setting the ignore_eof flag is a race condition. We could bother with adding demux_add_sh_stream() parameters for this, but let's not. So in theory a tiny race condition is introduced, which can never be triggered since all demux API functions are called by the playback thread only anyway. Fix that ts_offset is accessed without log (this was introduced much earlier by myself). Introduce an alternative way of avoiding the annoying EOF reached messages by not resetting the EOF flags for CC streams when a CC packet is added. This makes the second commit in the PR which added the original fix unnecessary. As another cosmetic change merge the check in cached_demux_control() into a single if(). In the future, the CC pseudo-stream should probably be replaced with an entire pseudo-demuxer or such, which would avoid some of the messiness (or maybe not, we don't know yet).
* demux: ignore false underrun reporting from eia_608 captions decoderAman Gupta2017-10-202-0/+4
|
* cache: throttle wakeupswm42017-10-201-2/+14
| | | | | | | | | | | | | | In the extreme case, reading 1 byte would wake up the cache to make the cache thread read 1 byte. This would be extremely inefficient. This will not normally happen in our cache implementation, but it's still present to some lesser degree. Normally you'd set a predefined "cache too low" boundary, after which you would restart reading. For some reason something like this is already present using a hardcoded value (FILL_LIMIT - I don't even know the deeper reason why this exists). So use that to reduce wakeups. This doesn't fix redundant wakeups on EOFs, which is especially visible should something keep retrying reading on EOF (like in an endless loop).
* wayland_common: don't scale the cursor wl_bufferRostislav Pehlivanov2017-10-191-1/+0
| | | | | Only gnome does something as stupid as always applying scaling to the cursor rather than just using a larger sized one with HIDPI.
* video: fix alpha handlingwm42017-10-191-2/+4
| | | | | | | | | Regression since ec6e8a31e092a1d. Removal of the explicit else case always applies the conversion to premultiplied alpha in the else branch. We want to scale with multiplied alpha, but we don't want to multiply with alpha again on top of it. Fixes #4983, hopefully.
* github: Google Drive suckswm42017-10-191-1/+2
| | | | Is there even anything that fucking sucks more than it?
* vo_gpu: add rgba16hf to the list of FBO formatsJames Ross-Gowan2017-10-182-4/+5
| | | | | | | This should be functionally identical to rgba16f, since the formats only differ in their representation on the CPU, but it could be useful for RA backends that don't expose rgba16f, like Vulkan. It's definitely useful for the WIP D3D11 backend.
* video: fix poitential NULL derefwm42017-10-181-2/+3
| | | | | Regression introduced by direct rendering code additions. Found by same static analyzer.
* aframe: fix logically dead codewm42017-10-181-1/+1
| | | | Detected by a well known static analyzer.
* tests: fix include after 6597998Ilya Tumaykin2017-10-171-1/+1
|
* vo_rpi: fix build (probably)wm42017-10-171-1/+1
| | | | Untested. If it works, fixes #4919.
* vo_gpu: remove weird p->vo indirectionwm42017-10-171-11/+9
| | | | That's just unnecessary.
* vo_gpu: fix video sometimes not being rerendered on equalizer changewm42017-10-174-4/+9
| | | | | | | | | | | | | | With video paused, changing the brightness controls (or similar) would sometimes not rerender the video frame. So the OSD would redraw, but the video wouldn't change. This is caused by output caching, and a redraw request is free to return the cached frame. Change it such to invalidate the cached frame if any of the options or the equalizer change. In theory, gl_video_reset_surfaces() could be called if the equalizer changes - this would apparently force interpolatzion to redraw all frames. But this looks kind of crappy when changing the equalizer during playback. It'll "eventually" use the correct settings anyway, and when paused interpolation is off.
* vdpau: remove some more dead codewm42017-10-162-11/+0
|
* av_common: fix Libav buildwm42017-10-161-0/+13
| | | | Fucking shit.
* video: remove special path for hwdec screenshotswm42017-10-164-102/+1
| | | | | | | This was phased out, and was used only by vdpau by now. Drop the mechanism and the vdpau special code, which means screenshots won't include the vf_vdpaupp processing anymore. (I don't care enough about vdpau, it's on its way out.)
* video: fix previous commitwm42017-10-161-2/+1
| | | | Sigh.
* video: make previously added hwdec params mechanism more genericwm42017-10-163-18/+20
| | | | | | | | | | | | The mechanism introduced in b135af6842bf assumed AVHWFramesContext would be enough. Apparently it's not - the intended use with Rockchip (not Rokchip btw.) requires accessing actual frame data in order to access the AVDRMFrameDescriptor struct. Just pass the entire mp_image to the new function. This is more flexible, although it slightly worries me that it will be less reusable for things which require setting up mp_image_params before any real frames are processed (such as filters).
* video: properly pass through ICC datawm42017-10-164-8/+62
| | | | | | | | | | | | | | | | | | The same should happen with any other side data that matters to mpv, otherwise filters will drop it. (No, don't try to argue that mpv should use AVFrame. That won't work.) ffmpeg_garbage() is copy&paste from frame_new_side_data() in FFmpeg (roughly feed201849b8f91), because it's not public API. The name reflects my opinion about FFmpeg's API. In mp_image_to_av_frame(), change the too-fragile *new_ref = (struct mp_image){0}; into explicitly zeroing out the fields that are "transferred" to the created AVFrame.
* mp_image: merge AVFrame conversion functionswm42017-10-161-38/+29
| | | | | | | | Merge mp_image_copy_fields_to_av_frame() into mp_image_from_av_frame(), same for the other direction. There isn't any good reason to keep them separate, and the refcounting handling makes it only more awkward.
* video: add mp_image_params.hw_flags and add an examplewm42017-10-167-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems this will be useful for Rokchip DRM hwcontext integration. DRM hwcontexts have additional internal structure which can be different depending on the decoder, and which is not part of the generic hwcontext API. Rockchip has 1 layer, which EGL interop happens to translate to a RGB texture, while VAAPI (mapped as DRM hwcontext) will use multiple layers. Both will use sw_format=nv12, and thus are indistinguishable on the mp_image_params level. But this is needed to initialize the EGL mapping and the vo_gpu video renderer correctly. We hope that the layer count is enough to tell whether EGL will translate the data to a RGB texture (vs. 2 texture resembling raw nv12 data). For that we introduce MP_IMAGE_HW_FLAG_OPAQUE. This commit adds the flag, infrastructure to set it, and an "example" for D3D11. The D3D11 addition is quite useless at this point. But later we want to get rid of d3d11_update_image_attribs() anyway, while we still need a way to force d3d11vpp filter insertion, so maybe it has some justification (who knows). In any case it makes testing this easier. Obviously it also adds some basic support for triggering the opaque format for decoding, which will use a driver-specific format, but which is not supported in shaders. The opaque flag is not used to determine whether d3d11vpp needs to be inserted, though.
* video: make it possible to always override hardware decoding formatwm42017-10-165-1/+21
| | | | | | | | Mostly an obscure option for testing. But --videotoolbox-format can be deprecated, as it becomes redundant. We rely on the libavutil hwcontext implementation to reject invalid pixfmts, or not to blow up if they are incompatible.
* restore-old-bindings.conf: add old macOS/Wayland AXIS bindingsJames Ross-Gowan2017-10-161-0/+7
| | | | These were changed in 7897f79217af to match X11 and Windows.
* vo_gpu: remove some minor dead codewm42017-10-161-3/+1
| | | | | This was for the "opengl" compat VO entry, which is now handled differently.
* vo_gpu: semi-fix --gpu-context/--gpu-api options and help outputwm42017-10-165-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was confusing at best. Change it to output the actual choices. (Seems like in the end it's always me who has to clean up other people's bullshit.) Context names were not unique - but they should be, so fix it. The whole point of the original --opengl-backend option was to side-step the tricky auto-detection, so you know exactly what you get. The goal of this commit is to make --gpu-context work the same way. Fix the non-unique names by appending "vk" to the names. Keep in mind that this was not suitable for slecting the "UI" backend anyway, since "x11" would force GLX, whereas people on not-NVIDIA actually want "x11egl". Users trying to use --gpu-context=x11 to force the X11 backend would always end up with GLX, which would at least break VAAPI hardware decoding for them. Basically the idea that this option could select the "UI" type is completely broken - it selects an implementation, which implies a UI. Selecting the UI type This would require a separate mechanism. (Although in theory this separate mechanism could be part of the --gpu-context option - in any case, someone would have to implement it.) To achieve help output that can actually be understood, just duplicate the code. Most of that code is duplicated anyway, and trying to share just the list code with the result of making the output unreadable doesn't make too much sense. If we wanted to save code/effort, we could just remove the help output altogether. --gpu-api has non-unique entries, and it would be nice to group them (e.g. list all OpenGL capable contexts with "opengl"), but C makes this simple idea too much of a pain, so don't do it. Also remove a stray tab from the android entry on the manpage.
* mp_image: select an explicit fallback for chroma locationwm42017-10-161-0/+7
| | | | | | | | | | If the chroma location is missing, vo_gpu will use centered chroma. Select a better chroma location by default: normally, it will always be MPEG video chroma location. If full levels are used, use JPEG chroma location, because that sort of sounds like it could make sense as it might coincide with JPEG being decoded. See e.g. #4804.
* manpage: add Vulkan WSI extension name for --gpu-context=winJames Ross-Gowan2017-10-141-1/+1
| | | | This matches the other Vulkan contexts.
* vo_gpu: mali-fbdev: fix build errorTobias Jakobi2017-10-131-2/+2
| | | | Apparantly the context was renamed.
* Copyright: some more licensing clarificationswm42017-10-134-11/+519
| | | | | | Unfortunately I'm also adding the full text of the LGPL license text, because the GPL one was already present in this repository, and I don't want to imply that the GPL somehow has priority.
* options: add --vlang switchwm42017-10-132-0/+4
| | | | For symmetry with --alang and --slang. 100% useless, but why not?
* stats: add file sizeJulian2017-10-131-1/+2
| | | | also one minor cosmetic change: comment the "coming soon" dummy page
* stats: clarify documentationJulian2017-10-131-7/+7
| | | | | Change true/false to yes/no because lua script configs only take these values for booleans.
* input.conf: explicit bindings for stats overlayJulian2017-10-131-0/+2
|
* wayland_common: init output_list during main struct initRostislav Pehlivanov2017-10-121-1/+2
| | | | | Otherwise if display connection or xkb init failed the uninit function could segfault.
* manpage: correct some comments about ordered chapterswm42017-10-111-6/+5
| | | | | Ordered chapters behavior changed at some point, and all of this was outdated.
* wayland_common: require wl_output v2 and send MP_INPUT_RELEASE_ALL on uninitRostislav Pehlivanov2017-10-111-8/+13
| | | | | | Every compositor (including toy compositors) has had support for wl_output v2 since forever, so there's little point in supporting degraded output for 5 year old releases (especially considering we require zxdg6 which is far more recent).
* vo_gpu: shaderc: include debug info when --gpu-debug is setJames Ross-Gowan2017-10-111-0/+2
| | | | | | | This adds symbol information to the generated SPIR-V, which shows up in the SPIR-V assembly dump. It's also useful for potential RA backends that use SPIRV-Cross, since the symbol information is used in the generated shader source.
* audio: clarify GPL-only partswm42017-10-101-1/+2
|
* demux_mkv: remove remaining GPL codewm42017-10-102-9/+1
| | | | Fuck this thing.
* build: make LGPL mode final (via --enable-gpl)wm42017-10-102-37/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename --enable-preliminary-lgpl2 to --enable-gpl. This concludes the relicensing. Some things are still to do (relicensing some still-GPL optional code), but we consider the code included by --enable-gpl to be fully relicensed. The relicensing was performed by asking every known author for permission for relicensing it to LGPL version 2.1 "or later". If an author could not be contacted or permission could not be obtained, and the contribution was considered relevant for copyright purposes, the affected code was either excluded from LGPL mode (not built), or removed or rewritten. This is the standard in open source relicensing processes. Keep in mind that using LGPL mode is still on the user's own risk. Even though I claim that the relicensing was pretty clean and thorough (measured on the standards of the open source community¹), and I followed the advice of some actual experts, there is still a residual uncertainty due to the fact that I'm not an all-knowing entity (authors could have taken someone else's code and pretend it's their own) nor a lawyer (meaning I might lack associated authority or expertise), and the fact that the judicial system is far from deterministic. The relicensing was performed merely to the best of my knowledge. I reject all responsibility outside of that. This commit also cleans up the "Copyright" file to reflect the finalized relicensing process. ¹ Not to imply that the standards of commercial companies are much higher. Some major tech companies get away with stuff I would not consider clean. See #2033.
* Add checks for HAVE_GPL to various GPL-only source fileswm42017-10-1031-0/+148
| | | | | | | | This should actually cover all of them, if you take into account that some unchanged GPL source files include header files with such checks. Also this was done already for the libaf derived code. This is only for "safety" and to avoid misunderstandings.
* wayland_common: adjust default cursor size and scale its bufferRostislav Pehlivanov2017-10-101-2/+3
| | | | | | | It turns out compositors which do scaling scale the cursor as well, so every single surface needs to get scaled too. Also, 32 corresponds to the default size for both GTK+ and KDE.
* vo: fix reference to mediacodec_embedAman Gupta2017-10-091-2/+2
|
* vo_gpu: android: fix gpu contextAman Gupta2017-10-092-0/+5
|
* vo_opengl: hwdec_vaegl: Use vaExportSurfaceHandle() if presentMark Thompson2017-10-091-0/+80
| | | | | | | | | | | This new interface in libva2 offers a cleaner way to export surfaces which can then be imported to EGL. In particular, this works with the Mesa driver, so we can have proper playback without a pointless download and upload on AMD cards. This change does nothing with libva1, and will fall back to the libva1 interface (vaDeriveImage() + vaAcquireBufferHandle()) if vaExportSurfaceHandle() is not present.
* vaapi: Use libva2 message callbacksMark Thompson2017-10-091-3/+29
| | | | They are no longer global, so they work vaguely sensibly.
* stats: add documentationJulian2017-10-093-1/+165
| | | | stats.rst is heavily based on osc.rst
* lua: integrate stats.lua scriptJulian2017-10-097-2/+14
| | | | | | | | | Signed-off-by: wm4 <wm4@nowhere> Rename --stats to --load-stats-overlay and add an entry to options.rst over the original commit. Signed-off-by: wm4 <wm4@nowhere>
* stats: change the way toggling/oneshot works internallyJulian2017-10-091-106/+109
| | | | | | | | | | | | | | | | Previously multiple timers were used to realize oneshot, toggling (redrawing) and page keybindings. The oneshot case in particular also relied on mp.osd_message to display text only for a given duration. This was changed to only use one timer in total now. Because now each case has a defined "start" and "end" point (including oneshot) mp.set_osd_ass() can be used to print stats as well. This is currently optional and has to be activated using the config option persistent_overlay=true. One shortcoming: oneshot and toggling are mutual exclusive right now. Previously you could enter toggling while oneshot stats were shown, this is not possible anymore to reduce the number of cases to be considered. This can be added later on if desired.
* stats: stop coloring timing valuesJulian2017-10-091-26/+8
| | | | | | It used a bad heuristic that got even worse/less reliable with recent changes in mpv. In fact, it's not reliable at all. Watch out for dropped frames instead. That's a useful indicator.
* stats: add current and total chapter numberJulian2017-10-091-1/+8
| | | | | Fixes #44 (well, partially, I'm still not sure about the time)
* stats: add audio and video filtersJan Janssen2017-10-091-0/+55
|
* stats: reorganize the framedrop countersNiklas Haas2017-10-091-4/+5
| | | | | Clarified the relationship between `Dropped` and `VO`, and also merged the DS-exclusive stats into the DS line.
* stats: revert DR indicator as it's unnecessaryJulian2017-10-091-2/+1
| | | | | It's apparently already stated as part of the upload pass name. This reverts commit ec837f64c29a1b825e28b65edc34059b6c1cad40.
* stats: reduce default font size to 8Julian2017-10-091-1/+1
|
* stats: visually indicate direct renderingJulian2017-10-091-1/+2
|
* stats: change font weight of % sign as wellJulian2017-10-091-1/+1
| | | | Due to popular demand
* stats: fix indentation/newline of frame timing pageJulian2017-10-091-11/+11
| | | | There was a superfluous newline and some indentation
* stats: show % of a pass on frame timing pageJulian2017-10-091-9/+23
|
* stats: always print perfdata totalJulian2017-10-091-7/+4
| | | | There's no point in disabling it anyway
* stats: make add_header() append at current positionJulian2017-10-091-7/+7
|<