summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* msg: flush after every message for --log-filewm42016-09-301-0/+1
| | | | | | We'd like to get log messages on the output as soon as possible in the output. I also feel like using fflush() is nicer than using setvbuf(). Who knows how the latter behaves on win32.
* vo_opengl: vaegl: log more debugging infoswm42016-09-301-7/+12
|
* vo_opengl: rpi: remove dumb commentwm42016-09-301-1/+0
| | | | It's not even true anymore.
* vo_opengl: rpi: fix glaring memory leakwm42016-09-301-2/+5
| | | | | This was in previously inactive code (uploading yuv420p), so it did not matter.
* vo_opengl: rpi: use overlay for yuv420p toowm42016-09-301-1/+6
| | | | | | | | | | | | | | | | The video code can deal fine with feeding software image formats to hwdec interop drivers. In RPI's case, this is preferable for performance, working around OpenGL bugs (see RPI firmware issue #666), and because OpenGL rendering doesn't bring too many advantages due to RPI supporting GLES 2.0 only. Maybe a way to force the normal video path is needed later. But currently, this can be tested by just not loading the hwdec interop driver. If you run command-line mpv and set --hwdec to something that does not load the RPI interop layer, you'll even have to use --hwdec-preload manually to get it enabled.
* vo_opengl: allow hwdec interops to support multiple image formatswm42016-09-303-2/+17
|
* vo_opengl: egl: print EGL errors only if not probingwm42016-09-301-6/+9
| | | | | Avoids printing an error when trying to create a GLES 3.x context on a device which can do GLES 2.0 only.
* vo_opengl: rpi: raise the video layerwm42016-09-301-3/+8
| | | | | | Was intended to put the GL layer above the standard console. (But actually that was done already, and the oddness I'm seeing seems to be an unrelated bug.)
* vd_lavc: log if hw decoding selects a different underlying decoderwm42016-09-301-0/+3
| | | | | Less confusing to see what's going on. I think there were more than one users who got tricked by this, including myself.
* rpi: add --hwdec=rpi-copywm42016-09-304-0/+12
| | | | | | This means it can be used with normal video filters. Might help out with #3604.
* ipc: log when listening to IPC socketwm42016-09-292-0/+4
| | | | Fixes #3598.
* path: default ~~ paths to home directorywm42016-09-291-0/+6
| | | | | | | | | | | | | The code for expanding the ~~ prefix used mp_find_config_file(), which strictly looks for _existing_ files in any config path (e.g. not just the user-local one, but also system-wide config). If no such file exists, it simply returns NULL, which makes the code below just return the literal, unexpanded path. Change this so that it'll resolve the path to the user-local config directory instead. Requested in #3591.
* player: enable reading from stdin after loading input.confwm42016-09-293-7/+8
| | | | Someone requested this.
* mp_image: fix clearing to black with p010 formatwm42016-09-291-1/+1
| | | | | Using vf_expand (which uses mp_image_clear()) with p010 cleared chroma to green instead.
* w32_common: implement VOCTRL_GET_DISPLAY_NAMESJames Ross-Gowan2016-09-292-3/+58
| | | | | | | | This should make display-names usable on Windows. It returns a list of GDI monitor names like "\\.\DISPLAY1". Since it may be useful to get the monitor that Windows considers associated with the window (with MonitorFromWindow,) this will always be returned as the first argument. This monitor is the one used for display-fps and icc-profile-auto.
* ytdl_hook: Set aspect ratio for anamorphic videoRicardo Constantino2016-09-281-0/+6
|
* cuda: initialize hwframes formatPhilip Langdale2016-09-281-0/+4
| | | | | In retrospect, this seems obvious, but ffmpeg didn't complain until a recent update.
* client API: "priority" option is now runtime settablewm42016-09-281-1/+0
| | | | | So it doesn't have to be in the list of options that can be set before mpv_initialize() only.
* msg: make --log-file and --dump-stats accept config path expansionwm42016-09-281-17/+27
| | | | | | | | | Seems like a valid use-case. Not sure if I like it calling back into the config code. Care has to be taken for not letting the config path resolving code dead-lock (which is why locking details in the msg.c code are changed). Fixes #3591.
* img_format: remove some unneeded format definitionswm42016-09-282-15/+0
| | | | They're still supported, just that they have no IMGFMT_ alias.
* win32: make --priority runtime-settableJames Ross-Gowan2016-09-284-11/+19
| | | | | | | | | | I'm not sure if this option affects anything or if it's a placebo, especially since the VO thread is now registered with MMCSS. Still, I think --priority=high may have helped back when I used mplayer2 on a netbook. It's also possible that encoding-mode users would want to set --priority=idle. Anyway, it was one of the last M_OPT_FIXED options, so fix that.
* win32: build with -DINITGUIDJames Ross-Gowan2016-09-2815-16/+4
| | | | | | | | | | | | We always want to use __declspec(selectany) to declare GUIDs, but manually including <initguid.h> in every file that used GUIDs was error-prone. Since all <initguid.h> does is define INITGUID and include <guiddef.h>, we can remove all references to <initguid.h> and just compile with -DINITGUID to get the same effect. Also, this partially reverts 622bcb0 by re-adding libuuid.a to the build, since apparently some GUIDs (such as GUID_NULL) are not declared in the source file, even when INITGUID is set.
* vo_opengl: deprecate 'drm-egl' backend and introduce 'drm' insteadwm42016-09-273-3/+23
| | | | Just a name change. Requested.
* stream_lavf: check seekable flag correctlywm42016-09-271-1/+1
| | | | | | AVIOContext.seekable is actually a bitfield. Currently, it has only AVIO_SEEKABLE_NORMAL defined, but it might be extended with a hint for non-byte seekability. Thus we should check it correctly.
* command: fix inverted condition in sub-reload commandwm42016-09-261-1/+1
| | | | Fixes #3586 (probably). Untested.
* vo_drm: provide display fpsrr-2016-09-262-2/+27
|
* cocoa: fix fullscreen regression on 10.11 and newerAkemi2016-09-261-1/+0
| | | | Fixes #3364.
* player: allow opts in pseudo-gui set by the user to override user's defaultRicardo Constantino2016-09-263-8/+18
| | | | | | | | | | | | | | | | | | | | | This should still allow user-set default options to override built-in pseudo-gui while respecting user-set pseudo-gui options. Pros: - user option in default profile overrides built-in pseudo-gui's options Ex: screenshot-directory overrides built-in pseudo-gui's - user can "fix" pseudo-gui if some option like "force-window=no" is set in default by setting "force-window=yes" in [pseudo-gui] - `mpv --profile=pseudo-gui` will work as before Cons: - --show-profile=pseudo-gui won't display the built-in's options Original idea from wm4. Documentation edits mostly by wm4. Signed-off-by: wm4 <wm4@nowhere>
* video: trust demuxer framerate on invalid timestampswm42016-09-261-1/+1
| | | | | | | | | If the PTS goes backwards (whether it's a timestamp reset or some other problem) would just use 0 as frame duration. (At least until the logic for detecting divergence with the timestamps gets active.) Trust the demuxer framerate in these cases instead, if it's available. I think this improves behavior slightly with some broken files.
* qthelper: introduce new convenience functionswm42016-09-262-0/+99
| | | | (Why the heck is the C++ helper not in a separate repository?)
* scripting: don't attempt to load builtin scripts twicewm42016-09-261-1/+0
| | | | | | | | | During init it will first call mp_load_builtin_scripts(), and then again via mp_load_scripts(). This was harmless (a second attempt won't load it again if the first one was successful), but it's unnecessary, and also looks confusing if the scripts failed to load the first time.
* stream_lavf: fix determining seekabilitywm42016-09-261-3/+23
| | | | | | | | | | | | | | | | | | | | demux_lavf.c forces seek to being determined as supported if STREAM_CTRL_HAS_AVSEEK is returned as success. But it always succeeds with current FFmpeg versions. (Seems like Libav commit cae448cf broke this in early 2016.) Now we can't determine via private API whether the underlying protocol supports read_seek anymore. The affected protocols (mostly rtmp) also set seekable=0, meaning they signal they're not seekable, even though read_seek would work. (My guess is that this can't be fixed because even though seekable is in theory a combination of elaborate flags [of which only 1 is defined, AVIO_SEEKABLE_NORMAL], a seekable!=0 always means it's byte-seekable in some way.) So the FFmpeg API is being garbage _again_, and all what we can do is determining this via protocol name and a whitelist. Should fix the behavior reported in #1701.
* DOCS/compile-windows.md: update msys2 instructions againKevin Mitchell2016-09-251-3/+3
| | | | they keep changing things. . .
* osc: Fix scaling issues when toggling fullscreenRicardo Constantino2016-09-251-0/+1
| | | | Fixes #3429
* sd_ass: fix top alignment of secondary subtitleswm42016-09-251-3/+4
| | | | | | | | | | | Secondary subtitle streams (to be shown on the top of the screen along main subtitle stream) were shown with normal alignment. This is because we tell libass to override the alignment style (a relatively recent change, see commit 2f1eb49e). This would behave differently with old libass versions too. To escape the mess, just set the alignment explicitly with an override tag instead of modifying the style.
* lua: complain loudly if Lua state creation failswm42016-09-251-1/+3
| | | | | | | This should normally happen only if memory allocation for the state happens, which should be extremely rare. But with Luajit on OSX, it can happen if the magic compiler flags required by Luajit were not passed to mpv compilation. Print an error to reduce confusion.
* options: do not mark --profile/--include as M_OPT_FIXEDwm42016-09-241-2/+2
| | | | | | | | | The intention of M_OPT_FIXED is to make options not runtime-changeable, so trying to set them at runtime will always error. This is not wanted for --profile and --include, for which there is no reason to block them at runtime. Fixes #3581.
* player: fix instant subtitle refresh on track switcheswm42016-09-242-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | When switching a subtitle track, the subtitle wasn't necessarily updated, especially when playback was paused. Some awfully subtle and complex interactions here. First off (and not so subtle), the subtitle decoder will read packets only on explicit update_subtitles() calls, which, if video is active, is called only when a new video frame is shown. (A simply video frame redraw doesn't trigger this.) So call it explicitly. But only if playback is "initialized", i.e. not when it does initial track selection and decoder init, during which no packets should be read. The second issue is that the demuxer thread simply will not read new packets just because a track was switched, especially if playback is paused. That's fine, but if a refresh seek is to be done, it really should do this. So if there's either 1. a refresh seek requested, or 2. a refresh seek ongoing, then read more packets. Note that it's entirely possible that we overflow the packet queue with this in unpredicated weird corner cases, but the queue limit will still be enforced, so this shouldn't make the situation worse.
* lua: fix array detectionwm42016-09-241-2/+2
| | | | | | | This was dumb and could return something like "{name=123}" as an array. Also, fix the error message if a key is not a string. lua_typename() takes a type directly, not a stack item.
* command: some minor corrections to previous commitwm42016-09-241-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | The last commit was fine - just making some enhancements. Rename the function to parse_node_chapters(), since it really has not much to do with Lua. Don't use len<0 as check whether it makes sense to set chapters, and instead check for mpctx->demuxer (that includes the possibility to set chapters e.g. within a preload hook, but after chapters are initialized from the demuxer). Return M_PROPERTY_ERROR instead of M_PROPERTY_OK if the mpv_node has the wrong type. It's ok if a chapter has no title, so change the checks accordingly. Remove a Yoda condition. Notify that chapter metadata might have changed with mp_notify() (the chapter list itself is already taken care by generic code). Fix leaking the metadata allocations of the new chapter list.
* command: make it possible to set chapters via lua pluginsMaurycy Skier2016-09-241-1/+70
|
* vo_opengl: hwdec_cuda: get the cuda device from the GL contextPhilip Langdale2016-09-241-3/+3
| | | | | | | | | | Obviously, in the vast majority of cases, there's only one device in the system, but doing this means we're more likely to get a usable device in the multi-device case. cuda would support decoding on one device and displaying on another but the peer memory handling is not transparent and I have no way to test it so I can't really write it.
* vo_opengl: hwdec_cuda: directly map GL textures and skip using PBOsPhilip Langdale2016-09-241-65/+20
| | | | | | | | | | | | | | | | | | | The documentation around this stuff is poor, but I found an nvidia sample that demonstrates how to use the interop API most efficiently. (https://github.com/nvpro-samples/gl_cuda_interop_pingpong_st) Key lessons are: 1) you can register the texture itself and have cuda write to it, thereby skipping an additional copy through the PBO. 2) You don't have to be mapped when you do the copy - once you get a mapped pointer, it remains valid. Magic! This lets us throw out the PBOs as well as much of the explicit alignment and stride handling. CPU usage is slightly (~3%) lower for 4K content in one test case, so it makes a detectable difference, and presumably saves memory.
* manpage: hwdec_cuda: update docs to say 10bit hevc is supportedPhilip Langdale2016-09-241-2/+2
| | | | | Now that ffmpeg bundles working headers, this no longer relies on a custom ffmpeg build with a hacked up header file.
* player: fix intended pseudo-gui behaviorwm42016-09-231-3/+3
| | | | It's still supposed to be possible to customize the pseudo-gui section.
* player: do not let pseudo-gui override user config settingswm42016-09-2311-11/+42
| | | | | | | | Seems like this confused users quite often. Instead of --profile=pseudo-gui, --player-operation-mode=pseudo-gui now has to be used to invoke pseudo GUI mode. The old way still works, and still behaves in the old way.
* m_config, command: remove some minor code duplicationwm42016-09-233-6/+11
| | | | | | I would have been fine with this, but now I want to add another flag, and the duplication would become more messy than having a strange function for deduplication.
* TOOLS/lua/observe-all: explicitly observe all optionswm42016-09-231-1/+9
|
* command: make most options observablewm42016-09-231-0/+6
| | | | | | | | | | | The property observation mechanism turns properties into integer IDs for fast comparison. This means if two properties get the same ID, they will receive the same notifications. Use this to make properties under options/ receive notifications. The option-property bridge marks top-level properties with the same name as the options. This still might not work in cases the C code sets values on options structs directly.
* vo_opengl: hwdec_rpi: remove copy&paste errorwm42016-09-231-1/+0
|
* vo: log framedropswm42016-09-231-1/+3
| | | | Seems useful. (This was possibly added ages ago and then removed.)
* command: fix potential UBwm42016-09-231-5/+5
| | | | Pointed out by quilloss on github.
* x11: fix external fullscreen updatewm42016-09-233-13/+19
| | | | | | | | | | | | On x11, you can change the fullscreen via the window manager and without mpv's involvement. In these cases, the internal fullscreen flag has to be updated. The hack used for this didn't really work properly. Change it accordingly. The important thing is that the shadow copy of the option is updated. This is still not really ideal. Fixes #3570.
* aspect: use nominal width instead of actual width for video-unscaledNiklas Haas2016-09-221-3/+3
| | | | | | | | The documentation claims that --video-unscaled will still perform anamorphic adjustments, and it rightfully should. The current reality is that it does not, because the video-unscaled size was based on the wrong set of variables. (encoded width/height instead of nominal display width/height)
* player: make audio-channels etc. runtime settablewm42016-09-223-5/+13
| | | | | | | | | If one of the audio output format options is set, brually reinit the audio chain. Since the audio-channels property is still mapped to the deprecated read-only property, "options/audio-channels" currently has to be used, e.g. "cycle-values options/audio-channels 2 7.1".
* command: add a load-script commandwm42016-09-226-5/+20
| | | | | | | The intention is to give libmpv users as much flexibility to load scripts as using mpv from CLI, but without restricting libmpv users from having to decide everything on creation time, or having to go through hacks like recreating the libmpv context to update state.
* player: remove some explicit options accesses when saving resume filewm42016-09-221-29/+26
| | | | | | | | | | | | | Basically, make use of all the new code. Unfortunately, the new code and it's "compromise semantics" with the old behavior before the options/properties merge bites back: this vid/aid/sid, deinterlace, and video-aspect properties have neutral default settings (such as "auto"), but return the current value during playback, so we would unnecessarily force this value when playback is resumed. So leave those as they are. Also, the colormatrix options were removed a long time ago.
* command: fix missing update notifications in some caseswm42016-09-221-0/+1
|
* player: some M_SETOPT_RUNTIME cleanupswm42016-09-223-21/+9
| | | | | | | | | Add this flag where needed. You shouldn't be able to set e.g. config-dir in these situations. Remove the mpctx->initialized check from the property/option bridge, since it's in use strictly only after initialization. Likewise, the apply-profile command doesn't need to check this.
* ytdl_hook: temporarily force disable dash segments formatsRicardo Constantino2016-09-221-4/+5
|
* vo: add a unique frame_id to vo_framewm42016-09-222-0/+9
| | | | | We think that this allows simpler logic than using the redraw and repeat fields. Not used yet.
* vo_opengl: apply 90° rotation to chroma texture sizewm42016-09-221-0/+3
| | | | | | | | | When we rotate the inmage by 90° or 270°, chroma width and height need to be swapped. Fixes #3568. But is the chroma sub location correct? Who the hell knows...
* hwdec/cuda: Document how to activate cuda deinterlacingPhilip Langdale2016-09-221-8/+11
| | | | | | The latest changes to the decoder in ffmpeg enable frame doubled deinterlacing so that it's actually useful. Let's document how to use it.
* cocoa: fix macOS 10.12 deprecation warningsAkemi2016-09-224-12/+45
|
* player: add --watch-later-directory optionDavid Logie2016-09-224-2/+19
| | | | | | | This option allows the user to set the directory where "watch later" files are stored. Signed-off-by: wm4 <wm4@nowhere>
* client API: more or less deprecate mpv_set_option()wm42016-09-218-56/+101
| | | | | | | | | | | | | | | | | | |<