summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vo_rpi: use EGL to render subtitleswm42015-08-185-137/+91
| | | | | | | | Slightly faster than using the dispmanx mess (perhaps to a large amount due to the rather stupid C-only unoptimized ASS->RGBA blending code). Do this by reusing vo_opengl's subtitle renderer, and vo_opengl's RPI backend.
* rpi: factor out context creationwm42015-08-182-63/+108
| | | | To be used by vo_rpi.c. No functional changes.
* demux_libarchive: reject 0-sized fileswm42015-08-181-0/+3
| | | | libarchive does strange things with them.
* stream: provide a stream_get_size() convenience functionwm42015-08-189-30/+27
| | | | | And use it everywhere, instead of retrieving the size manually. Slight simplification.
* demux_libarchive: open flat compressed fileswm42015-08-173-4/+13
| | | | | | | | Things like .gz etc., which have no real file header. A mixed bag, because it e.g. tends to misdetect mp3 files as compressed files or something (of course it has no mp3 support - I don't know as what it detects them). But requested by someone (or maybe not, I'm not sure how to interpret that).
* DOCS/client_api_examples/sdl: don't curse the mainloopwm42015-08-171-2/+2
| | | | Fix a typo, and also reword another comment.
* video: fix VideoToolbox/VDA autodetectionwm42015-08-174-44/+24
| | | | | | | | | | | | | | | This affects vo_opengl_cb in particular: it'll most likely auto-load VDA, and then the VideoToolbox decoder won't work. And everything fails. This is mainly caused by FFmpeg using separate pixfmts for the _same_ thing (CVPixelBuffers), simply because libavcodec's architecture demands that hwaccel backends are selected by pixfmts. (Which makes no sense, but now we have the mess.) So instead of duplicating FFmpeg's misdesign, just change the format to our own canonical one on the image output by the decoder. Now the GL interop code is exactly the same for VDA and VT, and we use the VT name only.
* stream: libarchive wrapper for reading compressed archiveswm42015-08-179-0/+378
| | | | | | | | | | | | | | | | | | | | This works similar to the existing .rar support, but uses libarchive. libarchive supports a number of formats, including zip and (most of) rar. Unfortunately, seeking does not work too well. Most libarchive readers do not support seeking, so it's emulated by skipping data until the target position. On backwards seek, the file is reopened. This works fine on a local machine (and if the file is not too large), but will perform not so well over network connection. This is disabled by default for now. One reason is that we try libarchive on every file we open, before trying libavformat, and I'm not sure if I trust libarchive that much yet. Another reason is that this breaks multivolume rar support. While libarchive supports seeking in rar, and (probably) supports multivolume archive, our support of libarchive (probably) does not. I don't care about multivolume rar, but vocal users do.
* player: actually close files on playback endwm42015-08-151-1/+1
| | | | Regression since commit 75b1d504.
* vo_rpi: fix NULL pointer derefwm42015-08-141-1/+1
| | | | Can happen in obscure situations and with hw decoding disabled.
* atomics: cleanup HAVE_ATOMICS definewm42015-08-132-5/+3
| | | | | | | The waf build system generates this already. No point in redoing it in the header file. The legacy build system (which we really should drop) didn't; fix it.
* vo_rpi: simplify background handlingwm42015-08-131-19/+1
| | | | Apparently this is sufficient.
* vo_rpi: unregister vsync callbackwm42015-08-131-1/+3
| | | | Small bug, much pain.
* vo_rpi: skip OSD rendering when repeating frameswm42015-08-131-4/+8
| | | | It's unnecessary and slow. Doesn't help too much, though.
* DOCS/client_api_examples/sdl: add more explanation commentswm42015-08-121-1/+21
|
* client API: change subtle wording to different subtle wordingwm42015-08-121-1/+1
| | | | | | | Make a difference between different mpv_handles pointing to the same mpv core, or different mpv cores. While we're not explicit about it, at least avoid that someone could misunderstand when really looking for the case of mpv_handles pointing to the same core.
* player: use OSD formattin for DS on the terminal status linewm42015-08-122-4/+9
|
* demux: remove redundant demux_chapter.name fieldwm42015-08-127-22/+13
| | | | | | | | | | Instead, force everyone to use the metadata struct and set a "title" field. This is only a problem for the timeline producers, which set up chapters manually. (They do this because a timeline is a separate struct.) This fixes the behavior of the chapter-metadata property, which never returned a "title" property for e.g. ordered chapters.
* vo: fix video EOF with display-syncwm42015-08-121-2/+2
| | | | | | | We must not use the frame PTS in any case. In this case, it fails because nothing sets it up to wake up. This typically caused the player to apparently "pause", until something else waked it up, like moving the mouse and other events.
* DOCS/client_api_examples/sdl: don't load file before GL initwm42015-08-111-4/+4
| | | | Could lead to failure because it's essentially a race condition.
* cocoa: hide cursor using a blank image instead of a system-wide APIRodger Combs2015-08-111-4/+14
| | | | Fixes #503
* DOCS/client_api_examples: add SDL OpenGL examplewm42015-08-112-0/+142
|
* manpage: fix typowm42015-08-111-1/+1
|
* osc: avoid annoying verbose mode log spamwm42015-08-101-6/+22
| | | | | | | | enable_key_bindings()/disable_key_bindings() now prints a log message on each call, thus we should avoid makign redundant calls. This could probably be solved more elegantly, but since this is all legacy/private API, don't bother.
* vo_rpi: support display syncwm42015-08-101-4/+51
| | | | | | | | This VO is special because it normally doesn't block on vsync, but can be made to do so. Supposedly the MMAL video output API merely sets a "current frame" field when sending an output frame, and the firmware will pick up whatever frame that field is set to at the time of a vsync.
* player: add display sync modewm42015-08-1013-17/+451
| | | | | | | | | | | | | | | | | | | | | | | | If this mode is enabled, the player tries to strictly synchronize video to display refresh. It will adjust playback speed to match the display, so if you play 23.976 fps video on a 24 Hz screen, playback speed is increased by approximately 1/1000. Audio wll be resampled to keep up with playback. This is different from the default sync mode, which will sync video to audio, with the consequence that video might skip or repeat a frame once in a while to make video keep up with audio. This is still unpolished. There are some major problems as well; in particular, mkv VFR files won't work well. The reason is that Matroska is terrible and rounds timestamps to milliseconds. This makes it rather hard to guess the framerate of a section of video that is playing. We could probably fix this by just accepting jittery timestamps (instead of explicitly disabling the sync code in this case), but I'm not ready to accept such a solution yet. Another issue is that we are extremely reliant on OS video and audio APIs working in an expected manner, which of course is not too often the case. Consequently, the new sync mode is a bit fragile.
* player: separate controls for user and video controlled speedwm42015-08-107-22/+64
| | | | | | | | | | For video sync, we want separate playback speed controls for user- requested speed and the "correction" speed for video timing. Further, we use this separation to make sure only a resampler is inserted if playback speed is only changed for video sync correction. As of this commit, this is basically inactive code. It's just preparation for the video sync code (the following commit).
* player: redo estimated-vf-fps calculationwm42015-08-104-7/+81
| | | | | | | | | | | | | | Additionally to taking the average, this tries to use the demuxer FPS to eliminate jitter, and applies some other heuristics to check if the result is sane. This code will also be used for the display sync code (it will actually make use of the require_exact parameter). (The value of doing this over keeping the simpler demux_mkv hack is somewhat questionable. But at least it allows us to deal with other container formats that use jittery timestamps, such as mp4 remuxed from mkv.)
* demux_mkv: disable timestamp fixup code againwm42015-08-102-2/+2
| | | | | | | | | | | | This doesn't work too well if sections of the file change to a different framerate. It lowers our chances to guess the correct FPS in the display sync code. For normal playback, this (probably) doesn't help that much anyway, except that the "estimated-vf-fps" property will regress in the simplest mkv case. This will be fixed with the next commit. The now disabled code will probably be removed; it's not useful anymore.
* TOOLS/stats-conv: allow passing regex via command linewm42015-08-101-1/+4
|
* video: remove old vdpau hwaccel API usagewm42015-08-103-233/+0
| | | | | | | While the "old" libavcodec vdpau API is not deprecated (only the very- old API is), it's still relatively complicated code that badly duplicates the much simpler newer vdpau code. It exists only for the sake of older FFmpeg releases; get rid of it.
* command: improve A-B loop OSD messageswm42015-08-101-2/+2
|
* TOOLS/lua/autoload: don't run if playlist is loadedRicardo Constantino2015-08-101-0/+4
|
* TOOLS/lua: Add zones.luaRicardo Constantino2015-08-091-0/+74
| | | | | | | | | | | | | | | | | Lua script that enables handling of certain commands depending on where the mouse pointer is. Mostly useful for mouse-wheel handling via input.conf. Example: MOUSE_BTN3 script-message-to zones commands "*-left: add volume +5" "default: seek +10" MOUSE_BTN4 script-message-to zones commands "*-left: add volume -5" "default: seek -10" Will changes behavior of Mouse Wheel Up/Down to alter volume if mouse is in the left zone of the window, but re-adds the default to seek if wheel is used on other parts.
* options: remove the period at the end of "No file."Niklas Haas2015-08-091-1/+1
| | | | | | Since we're on the topic of consistency, I've seen multiple users complain about the presence of this period, which does not really match other programs' behavior.
* options: move program name to end of window titleMartin Herkt2015-08-091-1/+1
| | | | Fixes #2188
* manpage: document videotoolbox supportwm42015-08-081-0/+1
|
* av_common: remove deprecated API usagewm42015-08-071-2/+0
| | | | | | | | | | As the removed comment says, not copying this field may cause problems on older libav* releases. See also commit 5f7de399. Remove this, as newer FFmpeg releases are available. As of this commit, use of mpv with FFmpeg 2.5.x and below, or Libav 11 and below is not recommended, and may lead to random video decoding issues. (Although the failure cases are apparently somewhat obscure.)
* audio: remove unused legacy libavutil headerwm42015-08-073-3/+0
| | | | It was never used, but is a leftover from old times.
* player: raise maximum idle timewm42015-08-071-1/+1
| | | | No reason to wake up every other minute.
* build: fix build with --disable-tv --enable-pvrwm42015-08-061-0/+1
| | | | | These share some code (frequencies.c at least), so linking was failing. Fix by making pvr depend on tv.
* manpage: use - as separator for the remaining commandswm42015-08-061-22/+22
| | | | | See commit 289705da. These manpage parts were just forgotten when updating the command descriptions.
* lua: implement input_enable_section/input_disable_section via commandswm42015-08-066-44/+31
| | | | | | | | | | | | | | | Removes some more internal API calls from the Lua scripting backend. Which is good, because ideally the scripting backend would use libmpv functions only. One awkwardness is that mouse sections are still not supported by the public commands (and probably will never), so flags like allow-hide- cursor make no sense to an outside user. Also, the way flags are passed to the Lua function changes. But that's ok, because they're only undocumented internal functions, and not supposed to be used by script users. osc.lua only does due to historical reasons.
* command: define-section with empty contents removes a sectionwm42015-08-062-1/+3
|
* lua: make mp.input_define_section use the define-section commandwm42015-08-062-21/+7
|
* command: add a command for defining input bindingswm42015-08-064-0/+32
| | | | | | This was requested. It was more or less present internally already and used for Lua scripting. Lua will switch to the "public" functions in the following commits.
* demux: add options to control maximum queue sizewm42015-08-056-6/+27
| | | | | | | | | | | | | | Add --demuxer-max-packets and --demuxer-max-bytes, which control the maximum size of the packet queue. These can be helpful to avoid excessive memory usage. Memory usage is the reason why there's a limit in the first place. If a file is more or less broken, and audio and video don't line up, the decoders will fill up the packet queue trying to read more audio or video, and the maximum sizes are required to avoid unbounded memory allocation. Being able to override the maximum sizes is useful; either for restricting memory usage further, or enlarging the sizes when attempting to play various broken files.
* demux: remove options to control minimum packet queue sizewm42015-08-055-27/+1
| | | | | | | | Remove --demuxer-readahead-packets and --demuxer-readahead-bytes. These were a bit useless. They could force a minimum packet queue size, but controlling the queue size with --demuxer-readahead-secs is much nicer. It's fairly certain nobody ever used these options.
* old-configure: add dummies for recently added config.h entrieswm42015-08-051-0/+9
| | | | | | | Also add a note that you should not use the old build system. (It's only kept because of the "asshole maintainer" rule: no matter how broken or pointless someting is, as long as you're the maintainer and want to keep it, it stays in the repo.)
* DOCS: document video-aspect behavior changewm42015-08-051-0/+3
| | | | Forgotten in commit ae2f8fd0.
* vf_vdpaurb: Don't segfault if input mpi is nullPhilip Langdale2015-08-051-0/+4
| | | | | This will happen when input EOF is reached but output frames remain to be shown.
* build: fix conditions for building gl_hwdec_vda.cwm42015-08-051-1/+1
| | | | | This contains code for the VT and VDA case, thus must be build if at least 1 of them is enabled.
* hwdec: add VideoToolbox supportSebastien Zwickert2015-08-0511-12/+198
| | | | | | | | VDA is being deprecated in OS X 10.11 so this is needed to keep hwdec working. The code needs libavcodec support which was added recently (to FFmpeg git, libav doesn't support it). Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* vo_vdpau: fix frame scheduling if display FPS is unknownwm42015-08-042-3/+3
| | | | | | | | | | | Pretty stupid: vo_get_vsync_interval() returns a negative value if the display FPS is unknown (e.g. xrandr not compiled), and the comparison whether the value is below 0 fails later because it's assigned to an unsigned int. Regression since commit e3d85ad4. Also, fix some comments in vo.c.
* charset_conv: use our own UTF-8 check with ENCA onlywm42015-08-041-6/+5
| | | | | | | | | | Some charsets can look like valid UTF-8, but aren't UTF-8. One example is ISO-2022-JP. While ENCA apparently likes to get misdetect real UTF-8, this is not the case with uchardet. uchardet can detect ISO-2022-JP correctly, but didn't even get to try, because our own UTF-8 check succeeded. So run the UTF-8 check when using ENCA only. Fixes #2195.
* command: always make video-aspect property accessiblewm42015-08-041-14/+14
| | | | | | Now it can always be read. Normally returns the value of the video- aspect option. Writing it sets the option. If the aspect is not forced, it will attempt to return whatever is the current video aspect.
* command: fix video-aspect property update notificationwm42015-08-041-1/+1
| | | | Fixes #2194.
* osc: completely disable if no VO window existswm42015-08-041-1/+7
| | | | | Fixes relatively excessive CPU usage when paused while playing audio only.
* command: make auto-deinterlacing output at field ratewm42015-08-041-1/+1
| | | | | | This was requested by a user. The vdpau and vaapi deinterlacers already do this.
* player: warn against using HLS URLs with --playlistwm42015-08-042-1/+8
| | | | | | | | | That just makes no sense, but seems to be a somewhat common user error. The detection is not perfect. It's conceivable that EXT-X-... headers are used in normal m3u playlists. After all, HLS playlists are by definition a compatible extension to m3u playlists, as stupid as it sounds.
* charset_conv: "auto" encoding detection now uses uchardet.Jehan2015-08-042-5/+8
| | | | | If mpv is not built with uchardet, "enca" is still the fallback default encoding detection.
* input.conf: remap d/D keyswm42015-08-043-7/+4
| | | | | | | | | | Drop d for toggling framedrop. Toggling this is way too special to be at such a prominent place, and in fact I believe toggling it is pointless. Remap deinterlacing from D to d. It's relatively useful and non- destructive. As suggested in #973 (almost).
* player: use demux_open_url() to open main fileswm42015-08-043-65/+41
| | | | | | | | | | | | | | | | Instead of opening a stream and then a demuxer, do both at once with demux_open_url(). This requires some awkward additions to demuxer_params, because there are some weird features associated with opening the main file. E.g. the relatively useless --stream-capture features requires enabling capturing on the stream before the demuxer is opened, but on the other hand shouldn't be done on secondary files like external subtitles. Also relatively bad: since demux_open_url() returns just a demuxer pointer or NULL, additional error reporting is done via demuxer_params. Still, at least conceptually, it's ok, and simpler than before.
* stream: remove remaining DVD/BD menu definitionswm42015-08-032-88/+0
|
* stream_bluray: remove menu implementationwm42015-08-031-358/+11
|
* stream_dvdnav: rip out lower-level menu implementationwm42015-08-031-255/+7
| | | | Separate because it might cause regressions.
* player: remove higher-level remains of DVD/BD menu supportwm42015-08-0320-541/+1
| | | | | | | | | | | | | | | Nobody wanted to restore this, so it gets the boot. If anyone still wants to volunteer to restore menu support, this would be welcome. (I might even try it myself if I feel masochistic and like wasting a lot of time for nothing.) But if it does get restored, it should be done differently. There were many stupid things about how it was done. For example, it somehow tried to pull mp_nav_events through all the layers (including needing to "buffer" them in the demuxer), which was needlessly complicated. It could be done simpler. This code was already inactive, so this commit actually changes nothing. Also keep in mind that normal DVD/BD playback still works.
* video: unbreak EOF with video-only files that have timestamp resetswm42015-08-031-1/+2
| | | | | | | Normally when there's a timestamp reset, we make audio resync to make sure audio and video line up (again). But in video-only mode, just setting audio to resyncing breaks EOF detection, because there's no code which would get audio_status out of this bogus state.
* vo: fix inverted condition