summaryrefslogtreecommitdiffstats
path: root/libmpv
Commit message (Collapse)AuthorAgeFilesLines
* client API: add MPV_ENABLE_DEPRECATED symbolwm42017-04-203-1/+33
| | | | | (Of course this is on by default, because otherwise we'd randomly break downstream applications.)
* Fix use of ISC licensewm42017-04-154-31/+15
| | | | | | | | | | The license text refers a "above copyright notice", so I guess it'd be good to actually provide such a notice. Add the license to some files that were missing it (since in theory, our Copyright file says that such files are LGPL by default). Remove the questionable remarks about the license in the client API.
* manpage, client API: add some clarifications when commands use OSDwm42017-04-011-0/+7
| | | | | The APIs that run commands in a more API-like manner disable OSD and string expansion by default.
* input: add "async" flagwm42017-04-011-0/+4
| | | | | | | | | | | Obviously, this has no effect on commands which do not support this explicitly. A later commit will enable this for screenshots. Also add some wording on mpv_command_async(), which has nothing to do with this. Having a more elegant, unified behavior would be nice. But the API function was not created for this - it's merely for running commands _synchronously_ on the core, but without blocking the client API caller (if the API user consistently uses only async functions).
* client API: clarify what stream_cb callbacks can dowm42017-03-171-1/+3
| | | | See #4227.
* client API: update outdated recommendations about window embeddingwm42017-03-022-23/+20
| | | | | | | Basically, the opengl-cb API causes fewer issues, even if it's a bit harder on the API user. See #4197.
* stream_cb: remove leftover doxygen linewm42017-02-201-1/+0
|
* vo_opengl: remove dxva2 dummy hwdec backendwm42017-02-201-20/+3
| | | | | | | | | This was a hack to let libmpv API users pass a d3d device to mpv. It's not needed anymore for 2 reasons: 1. ANGLE does not have this problem 2. Even native GL via nVidia (where this failed) seems to not require this anymore
* vo_opengl: implement videotoolbox hwdec on iOSAman Gupta2017-02-171-0/+1
| | | | | | Implements --hwdec=videotoolbox on iOS. Similar to hwdec_osx.c, but using CVPixelBuffer APIs available on iOS instead of the equivalent IOSurface APIs in macOS.
* client API: adjust opengl_cb hardware decoding commentswm42017-01-261-3/+6
| | | | | | Replace the reprecated --hwdec-preload option. Add a comment about cuvid/cuda decoding.
* client API: correct a comment in the API doxygenwm42017-01-081-2/+1
|
* client API: turn mpv_suspend() and mpv_resume() into stubswm42016-11-221-1/+4
| | | | | | | | | | | As threatened by the API changes document. This commit also removes or stubs equivalent calls in IPC and Lua scripting. The stubs are left to maintain ABI compatibility. The semantics of the API functions have been close enough to doing nothing that this probably won't even break existing API users. Probably.
* Fix some future release version numberswm42016-11-211-2/+2
| | | | | | Since the recent release was named 0.22.0 instead of 0.21.1, bump all mentions of 0.22.0 to 0.23.0. These were planned removals of deprecated versions, which obviously didn't happen in 0.22.0.
* 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.
* qthelper: introduce new convenience functionswm42016-09-261-0/+96
| | | | (Why the heck is the C++ helper not in a separate repository?)
* player: do not let pseudo-gui override user config settingswm42016-09-231-0/+1
| | | | | | | | 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.
* client API: more or less deprecate mpv_set_option()wm42016-09-211-19/+47
| | | | | | | | | | | | | | | | | | | | | | With the merging of options and properties, the mpv_set_option() function is close to being useless, and mpv_set_property() can be used for everything instead. There are certain conflicts remaining, which are explained in depth in the docs. For now, none of this should affect existing code using the client API. Make mpv_set_property() redirect to mpv_set_option() before initialization. Remove some options marked as M_OPT_FIXED. The "pause" and "speed" options cannot be written anymore without the playloop being notified by it, so the M_OPT_FIXED does nothing. For "vo-mmcss-profile", the problem was lack of synchronization, which has been added. I'm not sure what the problem was with "frames" - I think it was only marked as M_OPT_FIXED because changing it during playback will have no effect. Except for pause/speed, these changes are needed to make them writable as properties after mpv_initialize(). Also replace all remaining uses of CONF_GLOBAL with M_OPT_FIXED.
* client API: declare mpv_suspend/mpv_resume deprecatedwm42016-09-161-0/+5
| | | | | | | They're useless, and I have no idea what they're actually supposed to do (wrt. pending input processing changes). Also remove their implicit uses from the IPC handlers.
* client API: remove SIGPIPE overriding codewm42016-09-151-4/+0
| | | | | | | This workaround prevented that libmpv users could accidentally crash when the SIGPIPE signal was triggered by FFmpeg's OpenSSL/GnuTLS usage. But it also modifies the global signal handler state, so remove it now that this workaround is not required anymore.
* vo_opengl: add hw overlay support and use it for RPIwm42016-09-121-0/+23
| | | | | | | | | | | This overlay support specifically skips the OpenGL rendering chain, and uses GL rendering only for OSD/subtitles. This is for devices which don't have performant GL support. hwdec_rpi.c contains code ported from vo_rpi.c. vo_rpi.c is going to be deprecated. I left in the code for uploading sw surfaces (as it might be slightly more efficient for rendering sw decoded video), although it's dead code for now.
* client API: more option/property updateswm42016-09-031-2/+11
|
* client API: create core thread at an earlier timewm42016-09-011-1/+1
| | | | | | | | | | | | | Create the core thread right in mpv_create(), and reduce what mpv_initialize() does further. This is simpler, and allows the API user to do more before calling mpv_initialize(). The latter is not the real goal, rather we'd like mpv_intialize() reduced to do almost nothing. It still does a lot, but nothing truly special anymore that is absolutely required for basic mpv workings. One thing we want the user to be able to do is changing properties before mpv_initialize() to reduce the special status of mpv_set_option().
* client API: deprecate "no-..." option handlingwm42016-08-311-1/+1
| | | | | | | | The client API can do this (and there are apparently some libmpv using projects which rely on this). But it's just unnecessary bloat as it requires a separate code path from the option parser. It would be better to remove this code. Formally deprecate it, including API bump and warning in the API changes file to make it really clear.
* stream_cb: fix stale commentwm42016-08-081-1/+1
| | | | Oops.
* client API: bump API for stream_cbwm42016-08-071-2/+2
| | | | | | | | | Forgotten in previous commit. Also minor semi-related change: remove the extra "," from the mpv_sub_api enum, which I accidentally added in the previous commit. (C99 is fine with trailing ",", C89 strictly speaking not. So do this for maximum compatibility.)
* client API: add stream_cb API for user-defined stream implementationsAman Gupta2016-08-073-2/+233
| | | | | | Based on #2630. Some heavy changes by committer. Signed-off-by: wm4 <wm4@nowhere>
* client API: fix indentationwm42016-08-071-1/+1
|
* client API: add MPV_ERROR_GENERICwm42016-08-071-1/+5
| | | | Because why not.
* Use - as command-name separator everywhereTimotej Lazar2016-07-141-3/+3
| | | | | | | Old-style commands using _ as separator (e.g. show_progress) were still used in some places, including documentation and configuration files. This commit updates all such instances to the new style (show-progress) so that commands are easier to find in the manual.
* client API: remove "status" log level from mpv_request_event docswm42016-07-081-1/+1
| | | | | | Although it appears to be accepted by the function, MSGL_STATUS messages are never passed to the client API. Consequently "status" has the same meaning as "v" and is useless.
* client API: fully document opengl-cb hardware decoding interopwm42016-06-011-3/+40
| | | | | Document it exhaustively. Most of these issues were basically burried in the code.
* client API: improve mpv_set_property() handling of MPV_FORMAT_NODEwm42016-04-151-2/+12
| | | | | | | | | If a mpv_node wrapped a string, the behavior was different from calling mpv_set_property() with MPV_FORMAT_STRING directly. Change this. The original intention was to be strict about types if MPV_FORMAT_NODE is used. But I think the result was less than ideal, and the same change towards less strict behavior was made to mpv_set_option() ages ago.
* qthelper: fix potential NULL deref in error pathwm42016-03-221-2/+2
| | | | Found by clang-tidy.
* DOCS: add some hints to the new examples repositorywm42016-03-101-1/+2
|
* client API: explain when mpv_create() can return NULLwm42016-02-141-1/+4
|
* Fix some typos in code commentsAman Gupta2015-12-211-1/+1
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl_cb: make operation more similar to normal VOswm42015-11-091-1/+5
| | | | | | | | | | | | | | | | | | | | | vo_opengl_cb is a special case, because we somehow have to render video asynchronously, all while "trusting" the API user to do it correctly. This didn't quite work, and a while ago a compromise using a timeout to prevent theoretically possible deadlocks was added. Make it even more synchronous. Basically, go all the way, and synchronize rendering between VO and user renderer thread to the full extent possible. This means the silly frame queue is dropped, and we event attempt to synchronize the GL SwapBuffer call (via mpv_opengl_cb_report_flip()). The changes introduced with commit dc33eb56 are effectively dropped. I don't even remember if they mattered. In the future, we might make all VOs fetch asynchronously from a frame queue, which would mostly remove the differences between vo_opengl and vo_opengl_cb, but this will take a while (if it will even be done).
* client API: fix typo and wording in a commentwm42015-10-221-3/+3
|
* DOCS/client_api_examples/README: rewritewm42015-10-101-0/+16
| | | | | | The new one is much more detailed. Also add part of it to the libmpv doxygen.
* vo_opengl: add mechanism to retrieve Display from EGL contextwm42015-09-251-0/+10
| | | | | | | | | | The VAAPI EGL interop code will need access to the X11 Display. While GLX could return it from the current GLX context, EGL has no such mechanism. (At least no standard one supported by all implementations.) So mpv makes up such a mechanism. For internal purposes, this is very rather awkward solution, but it's needed for libmpv anyway.
* client API: rename GL_MP_D3D_interfaceswm42015-09-242-11/+29
| | | | | | | | | | | | | This is a pseudo-OpenGL extension for letting libmpv query native windowing system handles from the API user. (It uses the OpenGL extension mechanism because I'm lazy. In theory it would be nicer to let the user pass them with mpv_opengl_cb_init_gl(), but this would require a more intrusive API change to extend its argument list.) The naming of the extension and associated function was unnecessarily Windows specific (using "D3D"), even though it would work just fine for other platforms. So deprecate the old names and introduce new ones. The old ones still work.
* 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.
* client API, dxva2: add a workaround for OpenGL fullscreen issueswm42015-07-031-0/+18
| | | | | | | | | This is basically a hack for drivers which prevent the mpv DXVA2 decoder glue from working if OpenGL is in fullscreen mode. Since it doesn't add any "hard" new API to the client API, some of the code would be required for a true zero-copy hw decoding pipeline, and sine it isn't too much code after all, this is probably acceptable.
* client API: allow using msg-level option for log messageswm42015-06-201-1/+4
| | | | | | | | | | | | | | | | Client API users can enable log output with mpv_request_log_messages(). But you can enable only a single log level. This is normally enough, but the --msg-level option (which controls the terminal log level) provides more flexibility. Due to internal complexity, it would be hard to provide the same flexibility for each client API handle. But there's a simple way to achieve basically the same thing: add an option that sends log messages to the API handle, which would also be printed to the terminal as by --msg-level. The only change is that we don't disable this logic if the terminal is disabled. Instead we check for this before the message is output, which in theory can lower performance if messages are being spammed. It could be handled with some more effort, but the gain would be negligible.
* client API: add MPV_END_FILE_REASON_REDIRECTwm42015-06-111-1/+10
| | | | | Requested. Minor incompatible behavior change, as it was signalling MPV_END_FILE_REASON_EOF previously.
* Always block SIGPIPE globallywm42015-05-111-3/+5
| | | | | | | | | | | | | | | OpenSSL and GnuTLS are still causing this problem (although FFmpeg could be blamed as well - but not really). In particular, it was happening to libmpv users and in cases the pseudo-gui profile is used. This was because all signal handling is in the terminal code, so if terminal is disabled, it won't be set. This was obviously a questionable shortcut. Avoid further problems by always blocking the signal. This is done even for libmpv, despite our policy of not messing with global state. Explicitly document this in the libmpv docs. It turns out that a version bump to 1.17 was forgotten for the addition of MPV_FORMAT_BYTE_ARRAY, so document that change as part of 1.16.
* player: use profiles for libmpv and encoding defaultswm42015-05-071-0/+2
| | | | | | | | The client API (libmpv) and encoding (--o) have slightly different defaults from the command line player. Instead of doing a bunch of calls to set the options explicitly, use profiles. This is simpler and has the advantage that they can be listed on command line (instead of possibly forcing the user to find and read the code to know all the details).
* client API: add MPV_FORMAT_BYTE_ARRAY typewm42015-04-201-1/+28
| | | | | | | | | | | | This will be used in the following commit, which adds screenshot_raw. The reasoning is that this will be better for binding scripting languages. One could special-case the screenshot_raw commit and define fixed semantics for passing through a pointer using the current API, like formatting a pointer as string. But that would be ridiculous and unclean.
* vo_opengl_cb: deprecate mpv_opengl_cb_render()wm42015-04-092-15/+31
| | | | Its vp parameter made no sense anymore. Introduce a new one.
* vo_opengl_cb: add a function to report vsync timewm42015-04-093-1/+14
| | | | | | | And also let vo.c know of it. Currently, this does not help much, but will facilitate future improvements.
* client API: clarify mpv_opengl_cb_render() viewport parameterwm42015-03-091-1/+4
| | | | | | | | | | | | Basically, the idea behind the vp parameter is broken - I guess the intention was to enable rendering to a specific subrectangle of the target framebuffer, but there's nothing to specify the actual target rectangle (the VO will still clear e.g. the borders between video and framebuffer borders). We're not going to keep the current semantics either with the upcoming rework of vo_opengl, so declare this for broken. Maybe we can introduce a function later which does this properly.
* player, client API: refactor cplayer init, reduce client API differenceswm42015-03-051-3/+5
| | | | | | | | | | | | | Move the command line parsing and some other things to the common init routine shared between command line player and client API. This means they're using almost exactly the same code now. The main intended side effect is that the client API will load mpv.conf; though still only if config loading is enabled. (The cplayer still avoids creating an extra thread, passes a command line, and prints an exit status to the terminal. It also has some different defaults.)
* client API: hint that opengl_cb is an alternative to window embeddingwm42015-02-231-0/+7
|
* client API: clarify filename string encodingwm42015-02-141-0/+24
| | | | | | | Admittedly, the behavior on Windows is not quite straightforward. The behavior on the other platforms is equivalent to fopen(). Fixes #1585.
* client API: add mpv_wait_async_requests()wm42015-02-022-1/+16
| | | | | | | | | | | | | | | | | | | | This does what it's documented to do. The implementation reuses the code in mpv_detach_destroy(). Due to the way async requests currently work, just sending a synchronous dummy request (like a "ignore" command) would be enough to ensure synchronization, but this code will continue to work even if this changes. The line "ctx->event_mask = 0;" is removed, but it shouldn't be needed. (If a client is somehow very slow to terminate, this could silence an annoying queue overflow message, but all in all it does nothing.) Calling mpv_wait_async_requests() and mpv_wait_event() concurrently is in theory allowed, so change pthread_cond_signal() to pthread_cond_broadcast() to avoid missed wakeups. As requested in issue #1542.
* client API: notify API user on event queue overflowwm42015-01-191-5/+16
| | | | | | | | | | | | | | | Before this, we merely printed a message to the terminal. Now the API user can determine this properly. This might be important for API users which somehow maintain complex state, which all has to be invalidated if (state-changing) events are missing due to an overflow. This also forces the client API user to empty the event queue, which is good, because otherwise the event queue would reach the "filled up" state immediately again due to further asynchronous events being added to the queue. Also add some minor improvements to mpv_wait_event() documentation, and some other minor cosmetic changes.
* vo_opengl_cb: make mpv_opengl_cb_render() return left framesxylosper2015-01-081-1/+1
| | | | | | Instead of error code which was not helpful because it's always 0, mpv_opengl_cb_render() returns the number of left frames in the frame queue now.
* client API: clarify some vo_opengl_cb requirementswm42015-01-041-0/+6
| | | | Stupid drivers. I hope the problem described here isn't actually common.
* client API: add function to create new mpv_handles from existing oneswm42014-12-312-0/+27
| | | | | | | This may or may not be useful for client API users. Fold this API extension into the previous API bump. The previous bump was only yesterday, so it's ok.
* vo_opengl_cb: simplify API uninitializationwm42014-12-311-4/+13
| | | | | | | | | | | Until now, calling mpv_opengl_cb_uninit_gl() at a "bad moment" could make the whole thing to explode. The API user was asked to avoid such situations by calling it only in "good moments". But this was probably a bit too subtle and could easily be overlooked. Integrate the approach the qml example uses directly into the implementation. If the OpenGL context is to be unitialized, forcefully disable video, and block until this is done.
* client API: qthelper: return NULL as handle if unsetwm42014-12-301-2/+6
| | | | | | | | | Creating a plain Handle() should yield a NULL mpv_handle. Also, remove the redundant non-const definition of the conversion operator. At least in this situation it's not needed. Also, add include guards around qthelper.hpp.
* client API: qthelper: add a refcounting wrapper around mpv_handlewm42014-12-302-1/+31
| | | | | This is useful to deal with crazy Qt object lifetime issues (the following commit needs it).
* client API: document requirement to block SIGPIPEwm42014-12-241-0/+2
| | | |