From fc574ee5634112c21ee4b61d8f9b7517ec3192a2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 13 May 2018 12:46:50 +0200 Subject: ipc: some user-visible changes to prepare for making all commands async I wanted to put all commands through mpv_command_node_async() instead of mpv_command_node(). Using synchronous commands over a synchronous transport doesn't make sense anyway. This would have used the request_id field in IPC requests as reply ID for the async commands. But the latter need to be [u]int64, while the former can be any type. To avoid that we need an extra lookup table for mapping reply IDs to request_id values, we now require that request_id fields are integers. Since this would be an incompatible change, just deprecate non-integers for now, and plan the change for a later time. --- DOCS/interface-changes.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'DOCS/interface-changes.rst') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index fa42b1dc81..4afe18ae60 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -103,6 +103,9 @@ Interface changes of 3D content doesn't justify such an option anyway. - change cycle-values command to use the current value, instead of an internal counter that remembered the current position. + - ipc: require that "request_id" fields are integers. Other types are still + accepted for compatibility, but this will stop in the future. Also, if no + request_id is provided, 0 will be assumed. --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs -- cgit v1.2.3 From 332907e1d7225ae39565d462aac5c45c3a5cad97 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 17 May 2018 20:10:39 +0200 Subject: command: give named arguments to almost all commands Before this change, only 1 command or so had named arguments. There is no reason why other commands can't have them, except that it's a bit of work to add them. Commands with variable number of arguments are inherently incompatible to named arguments, such as the "run" command. They still have dummy names, but obviously you can't assign multiple values to a single named argument (unless the argument has an array type, which would be something different). For now, disallow using named argument APIs with these commands. This might change later. 2 commands are adjusted to not need a separate default value by changing flag constants. (The numeric values are C only and can't be set by users.) Make the command syntax in the manpage more consistent. Now none of the allowed choice/flag names are in the command header, and all arguments are shown with their proper name and quoted with <...>. Some places in the manpage and the client.h doxygen are updated to reflect that most commands support named arguments. In addition, try to improve the documentation of the syntax and need for escaping etc. as well. (Or actually most uses of the word "argument" should be "parameter".) --- DOCS/interface-changes.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'DOCS/interface-changes.rst') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 4afe18ae60..49c9bda9ba 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -106,6 +106,9 @@ Interface changes - ipc: require that "request_id" fields are integers. Other types are still accepted for compatibility, but this will stop in the future. Also, if no request_id is provided, 0 will be assumed. + - mpv_command_node() and mp.command_native() now support named arguments + (see manpage). If you want to use them, use a new version of the manpage + as reference, which lists the definitive names. --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs -- cgit v1.2.3 From 562d8e6d3236022a77e49a17948e25e493538f04 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 19 May 2018 12:37:37 +0200 Subject: player: simplify edition switching The player fully restarts playback when the edition or disk title is changed. Before this, the player tried to reinitialized playback partially. For example, it did not print a new "Playing: " message, and did not send playback end to libmpv users (scripts or applications). This playback restart code was a bit messy and could have unforeseen interactions with various state. There have been bugs before. Since it's a mostly cosmetic thing for an obscure feature, just change it to a full restart. This works well, though since it may have consequences for scripts or client API users, mention it in interface-changes.rst. --- DOCS/interface-changes.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'DOCS/interface-changes.rst') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 49c9bda9ba..b2974eff12 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -109,6 +109,8 @@ Interface changes - mpv_command_node() and mp.command_native() now support named arguments (see manpage). If you want to use them, use a new version of the manpage as reference, which lists the definitive names. + - edition and disc title switching will now fully reload playback (may have + consequences for scripts, client API, or when using file-local options) --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs -- cgit v1.2.3 From dbcd654e612ca32673cf2703758b05700cb87d03 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 19 May 2018 18:41:13 +0200 Subject: player: make playback termination asynchronous Until now, stopping playback aborted the demuxer and I/O layer violently by signaling mp_cancel (bound to libavformat's AVIOInterruptCB mechanism). Change it to try closing them gracefully. The main purpose is to silence those libavformat errors that happen when you request termination. Most of libavformat barely cares about the termination mechanism (AVIOInterruptCB), and essentially it's like the network connection is abruptly severed, or file I/O suddenly returns I/O errors. There were issues with dumb TLS warnings, parsers complaining about incomplete data, and some special protocols that require server communication to gracefully disconnect. We still want to abort it forcefully if it refuses to terminate on its own, so a timeout is required. Users can set the timeout to 0, which should give them the old behavior. This also removes the old mechanism that treats certain commands (like "quit") specially, and tries to terminate the demuxers even if the core is currently frozen. This is for situations where the core synchronized to the demuxer or stream layer while network is unresponsive. This in turn can only happen due to the "program" or "cache-size" properties in the current code (see one of the previous commits). Also, the old mechanism doesn't fit particularly well with the new one. We wouldn't want to abort playback immediately on a "quit" command - the new code is all about giving it a chance to end it gracefully. We'd need some sort of watchdog thread or something equally complicated to handle this. So just remove it. The change in osd.c is to prevent that it clears the status line while waiting for termination. The normal status line code doesn't output anything useful at this point, and the code path taken clears it, both of which is an annoying behavior change, so just let it show the old one. --- DOCS/interface-changes.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'DOCS/interface-changes.rst') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index b2974eff12..177cc908fd 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -111,6 +111,17 @@ Interface changes as reference, which lists the definitive names. - edition and disc title switching will now fully reload playback (may have consequences for scripts, client API, or when using file-local options) + - remove async playback abort hack. This breaks aborting playback in the + following cases, iff the current stream is a network stream that + completely stopped responding: + - setting "program" property + - setting "cache-size" property + In earlier versions of mpv, the player core froze as well in these cases, + but could still be aborted with the quit, stop, playlist-prev, + playlist-next commands. If these properties are not accessed, frozen + network streams should not freeze the player core (only playback in + uncached regions), and differing behavior should be reported as a bug. + If --demuxer-thread=no is used, there are no guarantees. --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs -- cgit v1.2.3 From 160e5c8377840ddc5cb80ab28a897c46f46851d2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 21 May 2018 14:58:40 +0200 Subject: player: remove deprecated vo/ao auto profiles These were deprecated almost 2 years ago. Now they happen to be in the way. --- DOCS/interface-changes.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'DOCS/interface-changes.rst') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 177cc908fd..b6dead571f 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -122,6 +122,8 @@ Interface changes network streams should not freeze the player core (only playback in uncached regions), and differing behavior should be reported as a bug. If --demuxer-thread=no is used, there are no guarantees. + - remove deprecated ao/vo auto profiles. Consider using scripts like + auto-profiles.lua instead. --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs -- cgit v1.2.3