aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* vo_opengl: don't allow setting 3D LUT if unsupportedGravatar wm42014-12-23
| | | | | The code was always uploading the 3D LUT (even of unused), as long as vo_opengl was setting a icc-profile. This could crash with GLES 2.
* vo_opengl: make use of newer OpenGL logging APIGravatar wm42014-12-23
| | | | | | GL_ARB_debug_output provides a logging callback, which can be used to diagnose problems etc. in case the driver supports it. It's enabled only if the vo_opengl "debug" suboption is set.
* demux_mf: add probing by mime typeGravatar wm42014-12-22
| | | | Reuses the mime type table introduced in the previous commit.
* demux_mkv: support embedded coverartGravatar wm42014-12-22
| | | | | | | | | | | The code could as well be in demux.c, but it's better to avoid accidental clashes with demux_lavf.c. FFmpeg provides no way yet to map a mime type to a codec, so do it manually. (It _can_ map a mime type to an "input format", but not a codec.) Fixes #1374.
* vo_opengl_cb: parse renderer parametersGravatar wm42014-12-22
| | | | | | Now it accepts the same renderer arguments as vo_opengl. This also disables debug checks by default, and reverts the background color override. Both can now be controlled by the host application.
* vo_opengl, vo_opengl_cb: check GL version in rendererGravatar wm42014-12-22
| | | | | | vo_opengl actually checks this in the context creation code already, but it still increases robustness in case the requirements are changed later.
* client API: fix compiler warning if openglcb API is disabledGravatar wm42014-12-22
| | | | | The function is void, and of course you can't return anything from it. (Why does C or gcc even allow this?)
* vo_opengl_cb: free context on exitGravatar wm42014-12-22
| | | | | | | Minor memory leak. Actually, this also exposes some problems in the QtQuick example. This will have to be fixed in the example.
* vo_opengl: fix feature detectionGravatar wm42014-12-22
| | | | Fixes #1373.
* client API: fix mpv_wakeup()Gravatar wm42014-12-22
| | | | | | Of course this was going to get stuck in the retry loop. Fixes #1372.
* sd_lavc: ignore image subtitles with unknown duration after 1 minuteGravatar wm42014-12-22
| | | | | | | | Most image subtitle formats implicitly terminate the current subtitle event with the next event (e.g. a new packet read from the demuxer will instruct the subtitle render to stop display). If the subtitle event is just trailing, it will be displayed forever. So there's no proper way of doing this and we just apply an heuristic to avoid annoyances.
* sd_lavc: compensate for a stupid libavcodec API issueGravatar wm42014-12-21
| | | | | | | | | The libavcodec PGS decoder sets end_display_time to UINT32_MAX, in an attempt to signal unknown end time (the API does not allow to signal this properly, and this was a backwards compatible hack). While we have no issues with the large value, our code wants to distinguish between known and unknown end time explicitly.
* sub: reset sub decoder correctly when cycling subtitlesGravatar wm42014-12-21
| | | | | | | | | | reset_subtitles() works in mpctx->d_sub[], which is set to NULL before calling it from uninit_sub(). This fixes resetting the subtitle when cycling subtitle tracks. Actually, this was probably a feature, because it's annoying if subtitles don't show up when cycling them. But it also can have unintended consequences, so get rid of it.
* player: cosmetics: move code aroundGravatar wm42014-12-21
| | | | Separate commit to reduce noise in the following one.
* old-configure: fix disabling VAAPI GLX with --disable-glGravatar wm42014-12-21
| | | | waf handles this correctly.
* vo_opengl: improve fallback handling with GLESGravatar wm42014-12-21
| | | | | | | | | Whether we have texture_rg doesn't matter much anymore; the scaler should be fine with this. But on ES 2.0, 1st class arrays are missing, so even if filterable float textures should be available, it won't work. Dithering (at least the "fruit" variant) will not work either, because it uses floats.
* vo_opengl: silence an INVALID_ENUM error with GLES2Gravatar James Ross-Gowan2014-12-21
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: GLES does not support GL_BGRAGravatar wm42014-12-20
| | | | | | | | | | | | | Apparently GLES 2 and 3 do not support this. (The implementations I tested with were derived from desktop OpenGL and were not overly strict with this.) This is no problem; just use GL_RGBA and mangle the channels in the shader. Also disable direct support for image formats like IMGFMT_RGB555 with GLES; at least some of them are not supported in this form, and the formats aren't important anyway.
* vo_opengl_old: fix OSD regressionGravatar wm42014-12-20
| | | | | | | | | | | | | | | | | Commit 0e8fbdbd removed the rg_texture requirement from vo_opengl; commit 541f6731 changed to a more convenient method. Both commits broke vo_opengl_old in some ways. vo_opengl_old always requires GL_ALPHA for single-channel texture, because it draws the OSD without shaders and by using certain blend modes. So we need to explicitly distinguish between vo_opengl and vo_opengl_old in the OSD renderer, and force fixed texture formats for vo_opengl_old. The other logic is specific to the internals of vo_opengl. (Although it might be possible to get the same result by playing with the old GL fixed-function functions in vo_opengl_old. But seems like a waste of time.) Fixes #1370.
* player: don't show "0%" percentage in infinite streamsGravatar wm42014-12-20
|
* ao_alsa: fix setting mono channel mapGravatar wm42014-12-20
| | | | | | | When setting the ALSA channel map, we never actually set the map we got from ALSA directly, but convert it to mpv's, and then back to ALSA's. mpv and ALSA use different conventions for mono, and there is already an exception for ALSA->mpv, but not mpv->ALSA.
* ao_alsa: remove some dead codeGravatar wm42014-12-20
| | | | | | | | This was only added recently (c1e97161) as an attempt to minimize the bad impact of channel layout device aliases. But use of these was removed in commit 49df0132. Now this code does pretty much nothing, and shouldn't be needed anymore. It does something when using spdif, but this fallback won't work anyway.
* audio: fix previous commitGravatar wm42014-12-20
| | | | | This would have always forced mono first (if supported by the AO), instead of stereo.
* audio: fix fallback if audio API does not support monoGravatar wm42014-12-20
| | | | This makes it fallback to stereo properly.
* cocoa: mark window for redraw after title changeGravatar Stefano Pigozzi2014-12-20
| | | | | | | This used to work correctly without the call to displayIfNeeded. I think this may only be needed for Yosemite. Fixes #1330
* player: print only changed tagsGravatar wm42014-12-19
| | | | | | | | | | | | | | | | | The code in the demuxer etc. was changed to update all metadata/tags at once, instead of changing each metadata field. As a consequence, printing of the tags to the terminal was also changed to print everything on each change. Some users didn't like this. Add a very primitive way to avoid printing fields with the same value again if metadata is marked as changed. This is not always correct (could print unchanged fields anyway), but usually works. (In general, a rather roundabout way to reflect a changed title with ICY streaming...) Fixes #813 (let's call it a "policy change").
* vo_opengl: remove pointless glFinish callsGravatar wm42014-12-19
|
* vo_opengl: skip GLES when autoprobingGravatar wm42014-12-19
| | | | | | | | There are probably bugs with GLES support; also, if you somehow get GLES instead of desktop GL on a desktop computer, something else is probably wrong. So I see no point in using this automatically. We first need to find out whether the GLES support works on real hardware, and whether it is useful at all.
* vo_opengl, x11: add ES context creation via GLXGravatar wm42014-12-19
| | | | | | | | Apparently GLX can do this, so using EGL is not strictly required. This code tries to create an ES context if creating a desktop GL context fails. Also, a "x11es" backend for forcing ES (instead of desktop GL) is added, mostly for testing and debugging.
* vo_opengl: fail if required functions are missingGravatar wm42014-12-19
| | | | | | | Before this, missing additional but required functions were ignored. ("Main" functions still made it error out.) But we pretty much expect that these are present on a given version level, and only an extremely buggy OpenGL implementation would not do this.
* vo_opengl: better probe handlingGravatar wm42014-12-19
| | | | | | | | | | | | | Involve detection of software renderers in the probing properly. Other VOs could handle probing also more gracefully, and e.g. produce less noise if an API is unavailable. (Although other than the OpenGL VOs, only vo_wayland will.) Now the "sw" suboption for vo_opengl[_old] is strictly speaking not needed anymore. Doing "--vo=opengl" disables the probing logic, and will always force it, if possible. Includes some simplifications as well.
* vo_opengl: minor simplificationGravatar wm42014-12-19
| | | | The parameter to default_tex_params() is always the same.
* vo_opengl: unborkGravatar wm42014-12-19
| | | | | | | | Probably. The version handling schema is a bit strange (and led to a tricky and obvious bug), but it's quite similar to what OpenGL does at some places, so I blame the OpenGL standard.
* vo_opengl: add GLES 2 supportGravatar wm42014-12-19
| | | | | | | | Rather basic support. Almost nothing works, and even if it does, it's bound to be inefficient (due to texture upload). This was tested with the nVidia desktop binary drivers, which provide GLES 2 support only. However, nVidia is not known to be very strict about OpenGL, and the driver is very new too, so the vo_opengl code will have bugs too.
* vo_opengl: mess with PixelStorei state managementGravatar wm42014-12-19
| | | | | | | | | | | | | | | | This is needed for GLES 2 support. GLES 2 doesn't support GL_UNPACK_ROW_LENGTH, and we shouldn't even use this constant, since a GLES implementation could raise an error. So set it only if neccessary, and leave it in the default state otherwise. This also smuggles in a ES 2 fallback for glUploadTex(), and querying an extension relevant for ES 2. For the alignment state (GL_[UN]PACK_ALIGNMENT) do the same for symmetry. All 4 states (alignment/rows x pack/unpack) are now assumed to be in their initial states by default. Also redo the PixelStorei handling in the function table. I could rebase this, but look at the commit time.
* vo_opengl: disable some unavailable features under ESGravatar wm42014-12-19
| | | | There are probably many more which I overlooked.
* vo_opengl: clean up GL ES function loadingGravatar wm42014-12-18
| | | | | | | | | | | | | | | | | | Previously, this was sort of messed together with desktop OpenGL loading. Add explicit support for ES, and clean up the mess. Also sort the function arrays alphabetically (at least most of them). In some cases, add functions to multiple sections. This keeps the number of sections down. Don't check for GL_ARB_vertex_array_object. This feature must be used in OpenGL 3 core, while it may be not available at all in earlier versions, and not using it if it's available as extension only has no advantages. This commit also considers GLES 2, because actual support for it will be added with a later commit. Also get rid of some MPGL_VER() uses (see some commits ago).
* vo_opengl: do not use 4x3 matrixGravatar wm42014-12-18
| | | | | | | | | | | This was a nice trick to get the mpv colormatrix directly into OpenGL, because the memory representation happened to match. Unfortunately, OpenGL ES 2 doesn't have glUniformMatrix4x3fv(). Even more unfortunately, the memory representation is now incompatible. It would be nice to change it, but that would mean getting into a big mess.
* vo_opengl: simplify some aspects of the GL function loaderGravatar wm42014-12-18
|
* vo_opengl, x11: make legacy context warning not an errorGravatar wm42014-12-18
| | | | | | Really, this doesn't actually matter. It's printed as error only because it was once thought to be an mostly unneeded fallback, but it turned out this is still frequently needed, and users are getting confused.
* x11: fix mysterious issue with window embedding on OpenBoxGravatar wm42014-12-18
| | | | | | | | | | | | | | | | | | | For some reason, when using window embedding, and the window manager is OpenBox, calling XSetWMNormalHints() before the window is mapped, the initial window position will be off. It leaves some vertical space, instead of placing it on the top/left corner. Suspiciously, the vertical space is as much as a the height of normal window decoration. I don't know what kind of issue this is. Possibly an OpenBox bug, but then this happens even if the override-redirect flag is set. (This flag basically tells the X server to ignore the window manager. Normally we don't set it.) On other window managers, it works fine. So I don't know why this is happening. But this is easy to workaround. XSetWMNormalHints() isn't needed at all if embedding. Should fix #1235.
* x11: minor improvementsGravatar wm42014-12-18
| | | | | | Always include the window position in winrc, even if the window embedded. This should give the correct positions for things which still interact with global coordinates, such as the xrandr code.
* vo_opengl: minor simplification in function loaderGravatar wm42014-12-18
| | | | Don't force every entries without functions to define a dummy array.
* vo_opengl: simplify the case without texture_rgGravatar wm42014-12-18
| | | | | | | | | | | | If GL_RED was not available, we used GL_ALPHA. But this is an unnecessary complication, and it's easier to use GL_LUMINANCE instead. With the latter, a texture will return the .r component set, and as long as the shader doesn't look at the other components, the shader doesn't need any changes. Some of the changes added in 0e8fbdbd are now unneeeded. Also, realign the entire gl_byte_formats_legacy table.
* player: cosmetics: remove ancient commentGravatar wm42014-12-17
| | | | | The DVD horror was confined to specific parts of the player, instead of having it spread everywhere.
* command: extend revert_seek commandGravatar wm42014-12-17
| | | | | "revert_seek mark" basically forces the seekback point. It's basically a one-way bookmark.
* vo_opengl: don't assume legacy OpenGL is available with GLESGravatar wm42014-12-17
| | | | | | OpenGL 3.0 has the weird situation that it's "hard" to detect whether legacy GL is really present. Since we pretend that we have OpenGL 3.0 if we use GLES, it was assuming legacy GL is available.
* build: add -Werror=format-security, add -W flags in all platformsGravatar wm42014-12-17
| | | | | | | The idea of using -Werror=format-security comes from MPlayer. Try to use the compiler flags with any compiler. There's no reason not to apply them on clang.
* vo_opengl: add some OpenGL standard symbols missing on OSXGravatar wm42014-12-17
| | | | | | Older OSX versions are missing some OpenGL 3 symbols, apparently. At least there's some precedent in the headers. Just add the symbols manually for now to fix OSX (on travis-ci) compilation.
* vo_opengl: GLES 3 supportGravatar wm42014-12-17
| | | | | | | | | | | | Tested with MESA on software emulation. Seems to work well, although the default FBO format in opengl-hq disables most interesting features. I have no idea how well it will work on real hardware (or if it does at all). Unfortunately, some features, including playback of 10 bit video, are not supported. Not sure what to do about this. GLES 2 or 1 do not work.