summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.10.0v0.10.0Martin Herkt2015-09-032-0/+980
|
* player: log error code on playback exitwm42015-09-031-0/+2
| | | | So far, this required using the client API to know it.
* ebml: warn if an EBML has unknown lengthwm42015-09-031-0/+4
| | | | | | | | | | | | | While unknown lengths are supported in some important cases like segments and clusters, they are not for small and complex metadata elements like the track list. Such elements are simply rejected. This case was caught by the size sanity check below, but the message is misleading and wrong. (There are likely no files in the wild which require support for this. The sample file I've seen was muxed by libavformat, but in a case where it aborted when writing the header. Clearly a broken file.)
* manpage: fix typowm42015-09-031-1/+1
| | | | Fixes #2279.
* vd_lavc: better hwdec log outputwm42015-09-022-4/+17
| | | | | | | | | | | | Often, we don't know whether hardware decoding will work until we've tried. (This used to be different, but API changes and improvements in libavcodec led to this situation.) We will often output that we're going to use hardware decoding, and then print a fallback warning. Instead, print the status once we have decoded a frame. Some of the old messages are turned into verbose messages, which should be helpful for debugging. Also add some new ones.
* vd_lavc: factor all hwdec fallbacks into the same functionwm42015-09-021-24/+19
| | | | | | | | The fallback at initialization time was basically duplicated, maybe for the sake of showing a different error message. This doesn't matter anymore; not much can fail at initialization anymore. Most meaningful and common errors happen either at probing or in get_format (when the actual hw decoder is initialized).
* vo_opengl: improve robustness against PBO failurewm42015-09-021-29/+40
| | | | | | | | | | | | | | If PBO upload fails, disable PBOs and revert to the normal codepath. In theory we should retry PBO upload on failure (because OpenGL specifies that it can sporadically fail), but since it normally doesn't happen, and the fallback will work, I'm not bothering. Some restructuring is needed, since glUnmapBuffer needs to be called earlier. In fact, the old code structure didn't make too much sense, and is a leftover from MPlayer's direct rendering support, which let the decoder decode to a PBO-mapped region. This means the buffer_ptr field can be dropped. Drop buffer_size as well, since it only had 2 possible values (0 or the size required for the current config).
* vo_opengl: enable pbo by default with opengl-hqwm42015-09-022-1/+2
| | | | | | | | | Can significantly help with very large video resolutions on nvidia drivers. It doesn't seem to have negative effects on Intel drivers either. (Although it could have on Intel drivers for older hardware.) For now, this is only for --vo=opengl-hq. Maybe --vo=opengl should use it too, but it's still meant to be the crappy, fail-safe default.
* vo_opengl: slightly simplify plane size determinationwm42015-09-021-2/+5
| | | | | | | | Setup a dummy image for the given image params, and get the plane sizes from that. Admittedly not much of a simplification, but conceptually it's simpler and less error-prone, as the image layout is guaranteed to be the same, rather than essentially duplicating the way it is determined.
* vo_opengl: don't distinguish "real" and texture sizewm42015-09-023-34/+28
| | | | | | | | This is from times when we supported padded/non-NPOT textures. The difference is not useful anymore, and theoretical support for different sizes is most likely buggy and unmaintained. So remove it. Also remove the tex_ prefix wherever it appears.
* vo_opengl: simplify PBO copywm42015-09-021-6/+2
| | | | | | | | Use mp_image_copy() instead of copying manually. (This function checks whether the destination is regarded writeable, which it is not, because the destination is the source image with changed pointers, so refcounting has to be removed from the destination image by resetting mpi->bufs.)
* vo_opengl: rename get_image to map_imagewm42015-09-021-2/+2
|
* vo_opengl: remove redundant statement in PBO codewm42015-09-022-5/+0
| | | | | | | | This shouldn't be needed anymore. Textures are now always allocated with the exact size. Any padding (including non-NPOT support) is gone. The texture sizes will always match the memory plane sizes. Drop the unused and forgotten "npot" field from the option struct too.
* screenshot: avoid confusing template error message with no fileKevin Mitchell2015-09-021-9/+11
| | | | | | | Previously, with mpv --force-window=yes --idle=yes --screenshot-template="%f", mpv would display an error saying that the template was incorrect, which it isn't, there's just no file to put in the format. In this case, just use the string "NO_FILE".
* sub: always try to use libavcodec text subtitle converterwm42015-09-011-12/+4
| | | | | | | | | | | | Drop the whitelist. It's annoying to maintain. Instead, accept any subtitle decoder. Since this code path will now also be taken by bitmap subtitle decoders not whitelisted by sd_lavc.c, add a warning when bitmap subtitles are decoded. (To reduce or increase potential user confusion.) To some degree, a whitelist is needed to distinguish text and bitmap subtitles. FFmpeg has an API to distinguish them in a generic way to some degree, but Libav doesn't. So we just stick with this for now.
* vo_opengl: remove some leftoverswm42015-09-011-4/+0
| | | | Forgotten in the previous commit.
* vo_opengl, vda: return to old statewm42015-09-012-31/+5
| | | | | | | | Undo 292266f2. Reapply 3e12e79b. An additional copy is not really justified, as it could reduce performance. On the other hand, we can force API users to create a GL 3.x context.
* sub: fix --sub-codepage UTF-8 with fallbackwm42015-09-011-0/+4
| | | | | | | | Fixes e.g --sub-codepage=utf8:gb18030 if the subtitle us UTF-8. This was broken in commit e5d31808. Also log the detected charset in verbose mode.
* vo_rpi, vo_opengl: do not globally terminate EGL on VO uninitwm42015-08-311-2/+1
| | | | | | | | | eglTerminate() affects the EGLDisplay in all threads. Since the RPI firmware apparently only ever uses EGL_DEFAULT_DISPLAY, this means it will trash all other contexts on other threads in the same process. Thus we don't call eglTerminate() at all, at least on RPI. Call eglReleaseThread() instead (which may or may not be a NOP).
* vo_opengl: fix alpha video in one casewm42015-08-301-0/+2
| | | | | | | | | yuva444p worked, yuva420p didn't. This happened because the chroma pass discards the alpha plane, which is referenced by the alpha blend code later. Add a terrible hack to work this around, actually using the same hack as was used for the Y plane. (A terrible hack for terrible code.)
* video: make container vs. bitstream aspect ratio configurablewm42015-08-307-18/+59
| | | | | | Utterly idiotic bullshit. Fixes #2259.
* w32: shift drag and drop appendsKevin Mitchell2015-08-301-2/+4
| | | | use the append to playlist functionality if shift is pressed while dropping
* x11: drag and drop append with modifierKevin Mitchell2015-08-302-1/+8
| | | | | | | If the drag and drop action is anything other than XdndActionCopy, append the dropped files rather than replacing the existing playlist. With most file managers, this will mean at least pressing shift while dropping.
* input: add append argument to file drop eventKevin Mitchell2015-08-306-12/+21
| | | | | | This puts in place the machinery to merely append dropped file to the playlist instead of replacing the existing playlist. In this commit, all front-ends set this to false preserving the existing behaviour.
* osc: reinit on playlist changesKevin Mitchell2015-08-291-0/+1
| | | | | | This takes care of the corner case where the player is started with a single playlist entry so that the next/prev arrows are greyed out, but remain that way even after new elements are added to the playlist.
* player: slightly better error reporting when opening file failswm42015-08-281-2/+7
| | | | Return MPV_ERROR_LOADING_FAILED instead of MPV_ERROR_NOTHING_TO_PLAY.
* client API: improve an error messagewm42015-08-281-1/+1
| | | | | This refers to media played by mpv, and these don't necessarily have to be files. They can be network resources or entirely abstract URLs too.
* osc: exit tick immediately if disabled.torque2015-08-281-0/+2
| | | | | | | | | | | Even after it has been disabled with the `disable-osc` message, the OSC continues to run the tick function. Completely preventing tick from being called is impractical since there are several different places that it's called in the code, so just make it immediately return if the OSC has been disabled. This prevents the OSC from continuing the clear the OSD on every tick, allowing other scripts to disable it so that they may draw to the OSD.
* sd_ass: assume negative durations are unknown durations, and handle themwm42015-08-271-5/+27
| | | | | | | | | | | | | | | The FFmpeg can officially not distinguish between unknown subtitle durations, and subtitle durations being 0. (It documents the value 0 meaning unknown duration.) In practice, at least the LRC demuxer signals unknown subtitle durations with a negative value. Assume negative durations mean unknown duration. Show subtitles with unknown duration forever. Unless there's a subtitle event following it; then reset the duration so that it ends on the new subtitle event. Fixes #2244.
* ytdl: catch bogous extractor infoChrisK22015-08-271-12/+12
| | | | | | | Some extractors may claim to have extracted subtitles, but then set the relevant fields to null. Try to catch those cases. Fixes #2254
* demux_mkv: discard broken indexwm42015-08-261-4/+17
| | | | | | | | | | | | | | | | Add a simplistic heuristic for detecting broken indexes. This includes indexes with very few elements (apparently libavformat sometimes writes such indexes, or used to), and indexes with broken timestamps. The latter was apparently produced by very old HandBrake versions: | + Muxing application: libmkv 0.6.1.2 | + Writing application: HandBrake 0.9.1 These broken files seem to be common enough that libavformat added a workaround for them in 2008 (and maybe again in 2015). Apparently all timestamps are multiplied with the file's tc_scale twice, and FFmpeg attempts to fix them. We should throw away the whole thing.
* demux_mkv: don't read index twicewm42015-08-261-1/+1
| | | | | | Actually, this never happened, because there's logic for ignoring duplicate header elements (which includes the seek index). This is mostly for robustness and readability.
* video: disable interpolation during framesteppingwm42015-08-251-0/+1
| | | | | | | It just causes annoying artifacts. Interestingly, this means keeping down the frame stepping key (".") will play video with interpolation disabled.
* vo_opengl: force redraw when framestepping with interpolationwm42015-08-251-1/+3
| | | | | | | | | | | | | | | | This might fix some problems when framestepping with interpolation enabled. The problem here is that we want to show the non-interpolated frame while paused. Framestepping is like unpausing the video for a frame, and then pausing again. This draws an interpolated frame, and redrawing on pausing is supposed to take care of this. This possibly didn't always work, because vo->want_redraw is not checked by the vo_control() code path. So wake up the VO thread (which takes care of servicing redraw requests, kind of) explicitly. The correct solution is getting rid of the public-writable want_redraw field and replacing it with a new vo_request_redraw() function, but this can come later.
* ao_alsa: fix minor memory leakwm42015-08-251-8/+11
| | | | | | | So snd_device_name_get_hint() return values do in fact have to be freed. Also, change listing semantics slightly: if io==NULL, skip the entry, instead of assuming it's an output device.
* vd_lavc: bump number of allocated surfaces for hwdec with HEVCwm42015-08-241-1/+4
|
* vaapi: add HEVC profile entrieswm42015-08-241-0/+10
| | | | | | | libavcodec does not support HEVC via VAAPI yet, so this won't work. However, there is ongoing work to add HEVC support to VAAPI, and this change might help with testing. (Or maybe not - but there is no harm in this change.)
* demux_libarchive: don't allow probing to read unlimited datawm42015-08-241-5/+17
| | | | | | | | | | | | | | | | | Instead, allow reading 2KB only. This seems to be sufficient for libarchive to recognize zip, 7z, rar, tar. Good enough. This is implemented by creating an in-memory stream with a copy of the file header. If libarchive succeeds opening this, the actual stream is opened. Allowing unlimited reading could break unseekable streams, such as playing from http servers with no range request support or pipes. Also, we try not to read too much data in the first probe pass. Some slow network streams like shoutcast services could make probing much slower if we allow it to read too much. In the second probing pass, actually allow 200KB.
* vda, videotoolbox: guard against unexpected pixel formatwm42015-08-231-0/+4
| | | | | | Should not happen, but since we don't control decoder video surface allocation, anything could happen, and the code should be able to deal with it. Untested.
* audio: don't sleep when finishing audio resyncwm42015-08-231-1/+1
| | | | | | | This should avoid unnecessary sleeping when audio playback start resync has finished and goes into the normal playback state. This is tricky; see e.g. commit 402fe381.
* vda, videotoolbox: fix broken condition in screenshot codewm42015-08-231-1/+1
| | | | Fixes #2237.
* stream_libarchive: read tar only in "unsafe" modewm42015-08-221-2/+4
| | | | | | | | | | As expected, probing with libarchive is a disaster. Both libavformat and libarchive are too eager to misdetect file formats just because files "might" be of a specific type. In this case, it's mp3 vs. tar. To be fair, neither file format has an actual header. I'm not sure why we'd need tar support, but since libarchive provides it, and idiots on the internet apparently pack media files in tar sometimes (really, idiots), keep it for now, and probe tar last.
* player: add --playlist-pos optionwm42015-08-225-1/+24
| | | | Oddly often requested.
* vo_opengl: remove dead codewm42015-08-221-9/+0
| | | | Leftover from 3245bfef.
* docs: correct typo for 'ingore-chmap'Ellis Berner2015-08-221-1/+1
| | | | ingore-chmap -> ignore-chmap
* command: make the playback-time property writablewm42015-08-212-2/+9
| | | | | | | Provides a simplistic way to seek without having to care about weird situations like timestamp vs. playback time. This is good, because the seek command is currently timestamp based, so when using the seek command the user _does_ have to care.
* player: return better guess for playback time during seekswm42015-08-211-13/+27
| | | | | | | | Always compute the estimated absolute time of the seek target, and display this as playback time during seeks. Improves behavior with e.g. .ts files, for which we try to avoid seeks by timestamp.
* options: sub-file replaces subfile, instead of subStian Eikeland2015-08-211-1/+1
|
* gl_wayland: Wait for frame callbacksJari Vetoniemi2015-08-211-0/+5
| | | | | Keep glSwapInterval(0) on to avoid blocking on gl calls, but wait for frame callbacks so we play nice with compositor.
* vo_wayland: Wait for frame callbacksJari Vetoniemi2015-08-213-18/+84
| | | | | | | Privdes small api for vo_wayland where one can request frame callback and then wait for it. This will make vo_wayland play video smoothly.
* gl_wayland: eglSwapInterval(0) to avoid blockingJari Vetoniemi2015-08-213-18/+14
| | | | This makes mesa not wait for frame callback internally.
* TOOLS/lua/autoload: fix adding more files at end of auto-playlistRicardo Constantino2015-08-201-2/+5
| | | | | | | | | Fixes regression in dfd8a5f that made autoload not add more files at the end of the current playlist if playlist was made by the script. This still prevents loading the script if more than one (media or playlist) file was manually added.
* TOOLS/lua/autoload: add all files on startwm42015-08-201-2/+2
| | | | | | Or almost. I don't know or care. Fixes #2219 (maybe, I don't know or care).
* stream_libarchive: disable raw filterwm42015-08-201-2/+0
| | | | | Too many false positives (it accepts things like unspecific text files), and also relatively useless.
* vo_opengl: add tscale-clamp optionNiklas Haas2015-08-205-2/+15
| | | | | | | | | | This significantly reduces the amount of noticeable flashing when using tscale kernels with negative lobes, by cutting them off completely. I'm not sure if this has any negative effects. It needs a bit of subjective testing over a period of time, so I just made it an option. Fixes #2155.
* vo_rpi: disable background by defaultwm42015-08-202-6/+18
| | | | And add an option to enable it.
* player: deliver IDLE event after uninitializing statewm42015-08-201-1/+1
| | | | | | | | | A client API user might count on the fact that audio and video outputs have already been uninitialized. (They remain uninitialized before entering idle mode in order to allow smooth transition to the next playlist entry.) Since event delivery is asynchronous, this has to happen after actually doing the uninitialization, or the client will essentially run into a race condition.
* gl_rpi: destroy the EGLSurface toowm42015-08-201-2/+5
| | | | Most likely doesn't matter much.
* vo_rpi: use correct variable for osd layerwm42015-08-201-1/+1
| | | | | This is a cosmetic change, because the value is exactly the same. (The old code just duplicates the logic, sort of.)
* stream_libarchive: fix libarchive callback signaturewm42015-08-201-1/+1
| | | | | | | | | | | libarchive uses a quite confusing ifdeffery mess for some of the types used in callbacks. Currently, archive_read_set_seek_callback() causes a warning at least on Windows due to mismatching return type. The header file uses __LA_INT64_T as return type, so I think the user is intended to use int64_t. (The ssize_t return type for the read_cb seems correct, on the other hand.)
* vo_rpi: fix blackscreen before the first subtitle/OSD is renderedwm42015-08-201-0/+1
| | | | | The OSD overlay wasn't initialized, so it remained solid black until the first time a subtitle line or an OSD element became visible.
* old-configure: avoid a warningwm42015-08-191-0/+1
|
* vd_lavc: remove unneeded hwdec parameterswm42015-08-198-25/+16
| | | | | | | All hwdec backends now use a single pixel format, and the format is always checked. Also, the init_decoder callback is now mandatory.
* video: don't decode 2 frames ahead with display-syncwm42015-08-191-2/+1
| | | | | This is not needed. It was used only temporarily in a development branch, and is a leftover from earlier rebasing.
* build: make sure the HAVE_ key is undefined on failureStefano Pigozzi2015-08-191-0/+1
| | | | | | Some particular checks can define the HAVE_ key on their own. To make sure they work correctly when composed (with compose_checks) we force the HAVE_ key to be undefined if a check fails.
* Revert "build: workaround for broken waf crap"Stefano Pigozzi2015-08-191-7/+1
| | | | This reverts commit 1b7883a3e57a39edfd39732efde5cd02417e3ebd.
*