summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* demux_timeline: request subtitle prefetching on crossing segmentswm42016-03-251-1/+1
| | | | | | | | | | | SEEK_HR is interpreted by demux_mkv.c, and enables subtitle preroll by prefetching additional subtitle pakcets which might overlap with the seek destination. This should make the case work when segment boundaries fall into the middle of subtitle events. This still usually leaves a flicker of at least 1 frame on start, because dec_sub.c does not ensure that enough subtitles are read before rendering after a segment switch. (Probably a WONTFIX.)
* ipc-win: restrict read access to the IPC pipeJames Ross-Gowan2016-03-251-2/+96
| | | | | | | | | | | | | | | The default security descriptor for named pipes in Windows allows the pipe to be opened for read access by the Everyone group and Anonymous account, as well as low-integrity processes (like web browser renderer processes.) This does not allow commands to be ran, but it does allow events to be received. I don't think any sensitive data is exposed by events, but that may not always be the case and Lua plugins might change this, since they can broadcast their own events with script-message. To be safe, this commit sets a custom security descriptor on the named pipe which only allows access from processes running under the same user account with an integrity level greater than or equal to the one used by mpv.
* vo_opengl: minor coding style adjustmentwm42016-03-241-3/+4
|
* vo_opengl: utils: some more minor shader string building optimizationwm42016-03-241-23/+35
| | | | | | | | | | | | Instead of reallocating almost all of the shader string several times per pass, build it into a fixed buffer that will be reallocated as needed. While this still uses a linear search and full comparison of the shader text, this will compare the shader's string length first before doing a full comparison as a nice side effect. (That's also why the fragment shader is compared first - it's more likely to be different for different cache entries than the vertex shader stub.)
* DOCS/interface-changes: mention --input-ipc-server changewm42016-03-241-0/+2
|
* ad_lavc, vd_lavc: support new Libav decoding APIwm42016-03-243-3/+38
| | | | For now only found in Libav.
* ad_lavc: add codec_timebase hack toowm42016-03-241-2/+5
| | | | | vd_lavc.c had this, and soon I'll need it in ad_lavc.c too. For now it's unused.
* vd_lavc: slightly improve codec_timebase hackwm42016-03-241-4/+3
| | | | | | The mp_set_av_packet()/mp_pts_from_av() functions check whether the timebase is set at all (i.e. AVRational.num!=0), so there's no need to fiddle with pointers.
* vo_opengl: utils: slightly optimize shader string buildingwm42016-03-231-22/+21
| | | | | Use bstr as appending buffer, which should avoid frequent reallocation and copying. The previous commit should help with this a little.
* bstr: avoid redundant vsnprintf callswm42016-03-231-3/+9
| | | | | | | | | | | | | | | | | Until now, bstr_xappend_vasprintf() called vsnprintf() always twice: once to determine how much output the call would produce, and a second time to actually output the data to the (possibly resized) target memory. Change this so that it tries to output to the already allocated memory first, and repeat the call only if allocation is required. This is especially helpful, as bstr_xappend_vasprintf() is designed to avoid reallocation when building strings. Usually, the second vsnprintf() will happen only at the beginning, when the buffer hasn't been extended to his largest needed size yet. Not sure if there is a need to optimize this; but see the next commit.
* vo_opengl_cb: fix NULL derefwm42016-03-231-1/+2
| | | | | Broken in commit d6c99c85. vo_opengl_cb.c adds the corner case that p->osd can be NULL. This make opengl-cb always crash.
* man: ipc: update for named pipe IPC on WindowsJames Ross-Gowan2016-03-232-11/+42
|
* ipc: rename --input-unix-socket to --input-ipc-serverJames Ross-Gowan2016-03-231-1/+2
| | | | | | | | | | | JSON IPC works on Windows now, and although the transports for each plaform have similar characteristics, they unfortunately have different names (Unix domain sockets on Linux/Unix vs. named pipes on Windows.) Hopefully this change better reflects the purpose of the option too, since with --input-ipc-server, mpv acts as an IPC server that can service many simultaneous clients (as opposed to --input-file, which can only do one-to-one IPC.)
* ipc: add Windows implementation with named pipesJames Ross-Gowan2016-03-236-430/+881
| | | | | | | | | | | | | | | This implements the JSON IPC protocol with named pipes, which are probably the closest Windows equivalent to Unix domain sockets in terms of functionality. Like with Unix sockets, this will allow mpv to listen for IPC connections and handle multiple IPC clients at once. A few cross platform libraries and frameworks (Qt, node.js) use named pipes for IPC on Windows and Unix sockets on Linux and Unix, so hopefully this will ease the creation of portable JSON IPC clients. Unlike the Unix implementation, this doesn't share code with --input-file, meaning --input-file on Windows won't understand JSON commands (yet.) Sharing code and removing the separate implementation in pipe-win32.c is definitely a possible future improvement.
* command: change "cache-speed" OSD formattingwm42016-03-222-6/+11
| | | | | Also change the property to an int, since using double is questionable and pointless.
* vo_opengl: fix blend-subtitles=video in some caseswm42016-03-221-0/+1
| | | | | | | | | Shader miscompilation and bad output. Regression probably since commit 93546f0c (or one of the following ones). Fixes #2982.
* qthelper: fix potential NULL deref in error pathwm42016-03-221-2/+2
| | | | Found by clang-tidy.
* vo_opengl, osd: allow osc.lua to react faster on resizeswm42016-03-215-16/+55
| | | | | | | | | Glitches when resizing are still possible, but are reduced. Other VOs could support this too, but don't need to do so. (Totally avoiding glitches would be much more effort, and probably not worth the trouble. How about you just watch the video the player is playing, instead of spending your time resizing the window.)
* command: add cache-speed propertywm42016-03-205-15/+71
| | | | | | | Should reflect I/O speed. This could go into the terminal status line. But I'm not sure how to put it there, since it already uses too much space, so it's not there yet.
* playlist: improve shuffle algorithmNiklas Haas2016-03-201-5/+3
| | | | | | | | | | | The old algorithm produced results which were not uniformly distributed, i.e. some particular shuffles were preferred over others. The new algorithm is an implementation of the Fisher-Yates shuffle which is guaranteed to shuffle uniformly given a sufficiently uniform rand() and ignoring potential floating-point errors. Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: GLX: try to create 3.3 core profile contextwm42016-03-193-6/+26
| | | | | | | | | | | | | | | | Until now, we have tried to create a GL 3.0 context. The main reason for this is that many Mesa-based drivers did not support anything better. But some drivers (Mesa AMD) will not report a higher OpenGL version, because their compatibility mode is restricted. While later GL features are reported as extensions just fine, there doesn't seem to be a way to determine or enable higher GLSL versions. Add some more shitty hacks to try to deal with this messed up situation, and try to probe each interesting GL version separately (starting with 3.3, then 3.2 etc.). Other backends might suffer from similar problems, but these will have to deal with it on their own. Probably fixes #2938, or maybe not.
* man: lua: fix typo in script-binding example.torque2016-03-191-1/+1
| | | | This line was added in ae5df9be98e4193342321f30285655fcf88e7e63, and it appears to have been a typo.
* Revert "wayland: set fs mode on every configure"Emmanuel Gil Peyrot2016-03-191-6/+5
| | | | | | | | | Prevents an infinite loop of configure event and set_fullscreen request on Weston and other compositors respecting the protocol. Fixes #2817 This reverts commit eb6b2b6e50e6e3d3db41190ad818d8b966750734.
* csputils: add DCI-P3 colorspaceNiklas Haas2016-03-193-0/+12
| | | | | | This colorspace has been historically used as a calibration target for most digital projectors and sees some involvement in the UltraHD standards, so it's a useful addition to mpv.
* DOCS/compile-windows.md: use CC=gcc.exe for msys2 compileKevin Mitchell2016-03-181-2/+2
| | | | | The .exe extension *is* required. It only kind of worked without it due to the --check-c-compiler flag.
* DOCS/compile-windows.md: update dependencies for msys2 buildKevin Mitchell2016-03-181-1/+1
| | | | | Apparently, you're not supposed to use msys2 pkg-config for mingw stuff. Also, in msys2, python *is* python3.
* TOOLS/lua/README: link to list of user scripts on wikiwm42016-03-181-1/+7
|
* lua: don't suspend core by default during script executionwm42016-03-183-8/+3
| | | | | | | | | This changes behavior somewhat. The old behavior can be restored by running "mp.use_suspend=true". It was originally introduced for the OSC, but I can't reproduce whatever misbehavior I was seeing. (See mp.suspend()/resume() for explanations what the suspend mechanism does.)
* vd_lavc: don't get into an endless loop if decoding failswm42016-03-181-0/+2
| | | | Regression since commit 6640b22a.
* demux_timeline: skip decoder reinit when seeking to same segmentwm42016-03-171-5/+3
| | | | | "Normal" seeks, which don't actually switch the segment, do not need to reinit the decoders.
* vo_opengl: dxva2egl: ignore alpha component in the mapped videowm42016-03-171-3/+1
| | | | | | | | | | | converted_imgfmt will be used by the renderer logic to build an appropriate shader chain. It doesn't influence the format of any textures. Thus it doesn't matter whether the hw video surface is mapped as RGB or RGBA. What matters is if the video actually contains alpha or not. Since virtually all hardware decoder do not support alpha in any way, this can be hardcoded as "no alpha". This avoids unnecessary GPU work.
* vo_opengl: fix operation without GL_ARB_texture_rgwm42016-03-171-4/+11
| | | | | | | | This also gets rid of the kind of hard to read texture swizzle setup and turns it into something dumber. Assumes that we don't create any FBOs with 2 channel formats. (Only the video source textures are handled by this commit.)
* ao_lavc: use new af_select_best_samplerate functionKevin Mitchell2016-03-171-0/+5
| | | | | | | | This is particularly useful for opus which allows only a fairly restrictive set of samplerates. If the codec doesn't provide a list of samplerates, just continue to try the requsted one and hope for the best. fixes #2957
* ao_wasapi: use new af_select_best_samplerate functionKevin Mitchell2016-03-171-11/+3
| | | | It duplicates the logic that was previously used here.
* audio: add af_select_best_samplerate functionKevin Mitchell2016-03-172-0/+32
| | | | | | This function chooses the best match to a given samplerate from a provided list. This can be used, for example, by the ao to decide what samplerate to use for output.
* dxva2: prevent outputting native surfaces with HWDEC_DXVA2_COPY (again)wm42016-03-171-1/+2
| | | | Not quite sure when/why exactly this was broken.
* vo_opengl: fix sharpen filterwm42016-03-163-4/+5
| | | | | | Regression since commit 93546f0c. Fixes #2956.
* DOCS/compile-windows.md: update MSYS2 instructionsKevin Mitchell2016-03-161-12/+37
| | | | | | | | * Use the update-core command * Add --check-c-compiler=gcc to be safe * Add warning about potential pitfalls of adding C:\msys2\mingw64\bin to %PATH% * Recommend winpty * Add note about ANGLE
* osd: fix build with --disable-libasswm42016-03-161-1/+1
|
* vo_opengl: only open one OpenGL/DX interop handle when using dxva2Kevin Mitchell2016-03-152-18/+23
| | | | | | | | | Previously, gl->DXOpenDeviceNV was called twice using dxva2 with dxinterop. AMD drivers refused to allow this. With this commit, context_dxinterop sets its own implementation of MPGetNativeDisplay, which can return either a IDirect3DDevice9Ex or a dxinterop_device_HANDLE depending on the "name" request string. hwdec_dxva2gldx then requests both of these avoiding the need to call gl->DXOpenDeviceNV a second time.
* input/event.h: add include guardwm42016-03-151-0/+4
|
* input: accept plain text for drag&dropwm42016-03-151-0/+7
| | | | | This will work for the X11 backend. It could be easily extended to Wayland too, maybe.
* x11, input: move mime type drag&drop negotiation to common codewm42016-03-153-4/+67
| | | | | | | | | | | | | Drag&drop mechanisms typically support multiple types for the drop data. Move most of the logic which types are accepted and preferred to event.c, where the data is also interpreted. (Maybe sorting the types by assigning scores is over-engineered, since they're already sorted by preference, but it's actually not much more code.) Not very interesting/meaningful yet, but preparation for the next commit.
* x11: move vo->input_ctx accesses to x11->input_ctxwm42016-03-152-19/+21
| | | | | | Reduces VO access and makes the code more self-contained. (One day the windowing backend code should not access the VO anymore. We're just not quite there yet.)
* mpv.rc: remove most contentswm42016-03-141-21/+0
| | | | In particular remove version.h to deal with my temporary build problem.
* command: dump tracklist if sub-add is run with the "cached" flagwm42016-03-141-0/+2
| | | | | mp_switch_track() doesn't do it automatically for whatever reason, so do it here.
* manpage: fix inverted condition in mixer-active descriptionwm42016-03-131-2/+2
| | | | | | Still not sure if the current text is actually understandable. Also fix a typo.
* player: add missing audio reconfig eventswm42016-03-131-0/+4
| | | | | | | This also takes care of sending the required property change notifications. Fixes #2929 and maybe fixes #2920.
* manpage: minor changes to some environment variableswm42016-03-121-5/+1
| | | | | | TERM isn't used anymore (except possibly indirectly by vo_caca). MPV_LEAK_REPORT should be thread-safe, modulo bugs.
* dec_video: always redisplay cover art after a seekwm42016-03-111-3/+1
| | | | | | | | | | | | | | | | Instead of displaying it only on playback start (or after switching tracks), always display it even after a seek. This helps with --lavfi-complex. You can now overlay e.g. audio visualizations over cover art, and it won't break after a seek. The downside is that this might make seeks with huge cover art slower. There is also a glitch on seeking: since cover art pictures always have timestamp 0, the playback time will be 0 for a moment after seek, and then revert to audio PTS (as video is considered EOF). This is also due to how lavfi's overlay filter behaves. (I'm not sure how to tell lavfi that it's just a single frame.)
* dec_video: reduce scope of variablewm42016-03-111-3/+3
| | | | | Almost only a cosmetic change, although it decreases pointless referencing/dereferencing of the cover art packet too.
* build: be less strict about line endingswm42016-03-111-2/+2
| | | | This is a shitty hack, but also not terribly offensive.
* manpage: add that dxinterop may work on intel.Kevin Mitchell2016-03-101-1/+2
|
* manpage: remove extraneous newlines from end of options.rstKevin Mitchell2016-03-101-2/+0
|
* manpage: add note about video filters and hwdecKevin Mitchell2016-03-101-1/+5
|
* manpage: document dxva2 option for hwdecKevin Mitchell2016-03-101-3/+6
| | | | Also mention dxva2-copy along with vaapi-copy.
* vo_opengl: add dxva2 interop to angle backendKevin Mitchell2016-03-103-0/+351
| | | | | | Like dxinterop, this uses StretchRect or RGB conversion. This is unavoidable as long as we use the dxva2 API, as there is no way to access the raw hardware decoded Direct3D9 surfaces.
* build: install symbolic SVG iconJashandeep Sohi2016-03-101-0/+4
|
* ytdl_hook: handle optional format_note▟ ▖▟ ▖2016-03-101-1/+1
| | | | | some extractors don't return a format_note for their audio stream which resulted in commandv complaining "argument 4 is not a string" (got nil).
* vo_opengl: use the same type for cached and current uniform valueswm42016-03-101-12/+11
| | | | Slightly improvement over the previous commit.
* vo_opengl: cache the values of the uniform variablesigv2016-03-101-20/+31
|
* README: eloborate on stable FFmpeg releases furtherwm42016-03-101-0/+5
| | | | We _really_ try to discourage using older releases.
* DOCS: add some hints to the new examples repositorywm42016-03-102-1/+16
|
* DOCS: remove client API exampleswm42016-03-1025-1936/+0
| | | | Moved to: https://github.com/mpv-player/mpv-examples
* demux: remove pausing mechanismwm42016-03-101-43/+22
| | | | | | | | | This is simpler, because it doesn't have to wait from both threads for synchronization. Apart from being simpler/cleaner, this serves vague plans to stop/start the demuxer thread itself automatically on demand (for the purpose of reducing unneeded resource usage).
* demux: replace demux_pause/demux_unpause with demux_run_on_threadwm42016-03-093-23/+60
| | | | | | | This pause stuff is bothersome and is needed only for a few corner- cases. This commit removes it from the demuxer public API and replaces it with a demux_run_on_thread() function and refactors the code which needed demux_pause(). The next commit will change the implementation.
* command: change stream-pos semanticswm42016-03-093-14/+6
| | | | | | | | | | | | | Changing the byte stream position without cooperation of the demuxer seems a bit insane, and is certainly useless. A user should do factor seeks instead. For formats like ts, this will actually translate to byte seeks, while treating the rest of the playback chain a bit more gracefully. With this argument, remove write access to this property. If someone really complains, proper byte seeks could be added as seek mode (although I'm going to need a convincing argument for this). Read access changes too, but in a more subtle way.
* vo_opengl: cache the locations of the uniform variablesigv2016-03-091-6/+13
|
* osd: cleanup: make OSDTYPE_ constants private to OSD codewm42016-03-087-31/+36
| | | | | | No need to have them everywhere. The only exception/annoyance is MAX_OSD_PARTS, which is now basically duplicated (and at runtime initialization is checked with an assert()).
* osd, lua: manage multiple ASS overlays set with set_osd_ass() callswm42016-03-086-44/+87
| | | | | | | | | | | | | | | | | | | | | | | | | Until now, there was only 1 global ASS overlay that co