summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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 could be set by all scripts. This was often perceived as bug when multiple scripts tried to set their own ASS overlay. This was kind of hard to solve because the script could set its own ASS PlayResX/Y, which makes it impossible to share a single ASS_Renderer for multiple scripts. The OSC unfortunately makes use of this feature (and unfortunately can't be fixed because it's a POS), so we're stuck with this complication. Implement the worst-case solution and fix this by creating separate ASS track and renderer objects for each script that wants to set an ASS overlay. The z-order is decided by the order the scripts set their text first. This is essentially random, unless you do it at script init, and you pass scripts in a specific order. Script initialization is currently serialized (as a feature), so the first loaded script gets lowest Z-order. The Lua script API interestingly remains the same. (And also will remain undocumented, unsupported, and potentially volatile.)
* osd: restructure and move ASS objects into its own structwm42016-03-082-61/+81
| | | | | | All ASS objects used by the OSD renderer go into struct ass_state. Preparation for the following commit.
* osd: refactor how mp_ass_render_frame() is calledwm42016-03-086-16/+22
| | | | | | | | Instead of passing an explicit cache to the function, the res parameter is used. Also, instead of replacing its contents, sub bitmaps are now appended to it (all assuming the format doesn't actually change). This is preparation for the following commits.
* TOOLS/lua/zones.lua: RemoveRicardo Constantino2016-03-081-74/+0
| | | | Check wiki/User-Scripts for more up-to-date version.
* osc: fix mouse areaswm42016-03-081-1/+1
| | | | | | | | The scaling was the wrong way around, and the section name was missing. Regression since commit 5fa45fb5. Fixes #2916.
* vo_opengl: decrease default superxbr-edge-strengthNiklas Haas2016-03-071-1/+1
| | | | | | The default of 1.0 was basically making half the algorithm do nothing, since it turned off all diagonal contributions. The upstream default is 0.6, and this produces a more reasonable image.
* vo_opengl: improve superxbr algorithmNiklas Haas2016-03-071-12/+11
| | | | | | | | The values were changed to reflect an upstream change in the source for the super-xBR implementation. The anti-ringing code was basically not working at all, the new algorithm _significantly_ improves the result (reduces ringing).
* vo_opengl: refactor superxbr algorithmNiklas Haas2016-03-073-133/+150
| | | | | | | | | | | | | | | | | | This is a fresh implementation from scratch that carries with it significantly less baggage and verbosity from the previous (ported) version. The actual values for the masks and such were copied from the current code. Behavior and performance should be unaffected. An important difference between the old code and the new code is that the new code always explicitly samples from the first component, rather than being able to process multiple planes at once. Since prescale-luma only affects luma, I deemed this unnecessary. May change in the future, if prescale-chroma ever gets implemented. But prescaling multiple planes would be slow to do this way. (Better would be to generalize it to differently-sized vectors)
* osd, lua: remove weird OSD scalingwm42016-03-076-74/+40
| | | | | | | | | | | | | | | | | | | | | Do not scale OSD mouse input to the ASS OSD script resolution. The original idea of this mechanism was that the user doesn't have to care about the actual resolution of anything, and can just use the OSD resolution consistently. But this made things worse. Remove the implicit scaling, and always use the screen resolution. (Except with --vo=xv, where additional scaling is forced upon everything.) Drop get_osd_resolution(). There is no replacement. Rename get_screen_size() and get_screen_margins() to use "osd" instead of "screen". For anything but --vo=xv these are equivalent, but with --vo=xv the OSD resolution has additional implicit scaling. Add code to osc.lua which emulates the old behavior. Note that none of the changed functions were public API, so implicit breakage of scripts which used it is just going to happen.
* osd: remove unused osd_coords_to_video()wm42016-03-072-22/+0
| | | | Used to be used for dvdnav.
* video: fix coverart decodingwm42016-03-071-2/+4
| | | | | | | | | | Deselecting cover art and then reselecting it did not work. The second time the cover art picture is not displayed again. (This seems to break every other month...) The reason is commit 6640b22a. It mutates the input packet. And it is correct that we don't own d_video->header->attached_picture at this point. Fix it by creating a new packet reference.
* README: edit release section, add section about preferred FFmpeg versionwm42016-03-071-10/+13
| | | | All using properly seasoned words.
* vo_xv, vo_x11: warn that these VOs should not be usedwm42016-03-062-0/+5
|
* sub: make preloading more robustwm42016-03-066-21/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subtitles can be preloaded, which means they're fully read and copied into ASS_Track. This in turn is mainly for the sake of being able to do subtitle seeking (when it comes down to it, subtitle seeking is the cause for most trouble here). Commit a714f8e92 broke preloaded subtitles which have events with unknown duration, such as some MicroDVD samples. The event list gets cleared on every seek, so the property of being preloaded obviously gets lost. Fix this by moving most of the preloading logic to dec_sub.c. If the subtitle list gets cleared, they are not considered preloaded anymore, and the logic for demuxed subtitles is used. As another minor thing, preloadeding subtitles did neither disable the demux stream, nor did it discard packets. Thus you could get queue overflows in theory (harmless, but annoying). Fix this by explicitly discarding packets in preloaded mode. In summary, now the only difference between preloaded and normal demuxing are: 1. a seek is issued, and all packets are read on start 2. during playback, discard the packets instead of feeding them to the subtitle decoder This is still petty annoying. It would be nice if maintaining the subtitle index (and maybe a subtitle packet cache for instant subtitle presentation when seeking back) could be maintained in the demuxer instead. Half of all file formats with interleaved subtitles have this anyway (mp4, mkv muxed with newer mkvmerge).
* demux: delay bitrate calculation on packets with unknown timestampswm42016-03-051-2/+2
| | | | | | | | | Commit 503c6f7f essentially removed timestamps from "laces" (Block sub- divisions), which means many audio packets will have no timestamp. There's no reason why bitrate calculation can't just delayed to a point when the next timestamp is known. Fixes #2903 (no audio bitrate with mkv files).
* sd_ass: always clear subtitles on seek if duration unknownwm42016-03-051-1/+1
| | | | | | | Although there is logic to prune subtitles as soon as they get too old in this mode, this is not done for the _currently_ shown subtitles. Thus explicitly clearing subtitles on seek is required to avoid duplicate subtitles in certain cases when seeking.
* vo_opengl: refactor plane-skipping optimizationsNiklas Haas2016-03-051-16/+26
| | | | | | Instead of hard-coding the logic and planes to skip, factor this out to a reusible function, and instead add the number of relevant coordinates to the texture state.
* vo_opengl: rename prescale to prescale-lumaNiklas Haas2016-03-053-23/+18
| | | | | | Since prescale now literally only affects the luma plane (and the filters are all designed for luma-only operation either way), the option has been renamed and the documentation updated to clarify this.
* vo_opengl: add macros for scaler units</