summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-03-13 10:45:17 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-03-15 23:13:53 -0700
commit8163b8d390a97fdedb1419c921ec89eee3c31b7e (patch)
treeb80e969bca12565696602a2c876efe8c08d5dd73
parent569383bc54cc2c7e0367614e811773c6bff7244e (diff)
downloadmpv-8163b8d390a97fdedb1419c921ec89eee3c31b7e.tar.bz2
mpv-8163b8d390a97fdedb1419c921ec89eee3c31b7e.tar.xz
client API: deprecate qthelper.hpp
It's a WTF that we have something as specific in the API. It could be argued that we should provide helpers for other language and GUI toolkit combinations. Obviously that's not going to scale, and it's somewhat likely that it will bitrot. The rest is said in the API changelog.
-rw-r--r--DOCS/client-api-changes.rst6
-rw-r--r--libmpv/qthelper.hpp16
2 files changed, 17 insertions, 5 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index b9240ac64a..e029b29979 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -55,6 +55,12 @@ API changes
mpv_opengl_cb_report_flip => mpv_render_context_report_swap
mpv_opengl_cb_uninit_gl => mpv_render_context_free
The VO opengl-cb is also renamed to "libmpv".
+ - deprecate the qthelper.hpp header file. This provided some C++ helper
+ utility functions for Qt with use of libmpv. There is no reason to
+ keep this in the mpv git repository, nor to make it part of the libmpv
+ API. If you're using this header, you can safely copy it into your
+ project - it uses only libmpv public API. Alternatively, it could be
+ maintained in a separate repository by interested parties.
1.27 - make opengl-cb the default VO. This causes a subtle behavior change
if the API user called mpv_opengl_cb_init_gl(), but does not set
the "vo" option. Before, it would still have used another VO (like
diff --git a/libmpv/qthelper.hpp b/libmpv/qthelper.hpp
index bc30dec8a5..3af86e36e7 100644
--- a/libmpv/qthelper.hpp
+++ b/libmpv/qthelper.hpp
@@ -13,6 +13,15 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef MPV_CLIENT_API_QTHELPER_H_
+#define MPV_CLIENT_API_QTHELPER_H_
+
+#include <mpv/client.h>
+
+#if !MPV_ENABLE_DEPRECATED
+#error "This helper is deprecated. Copy it into your project instead."
+#else
+
/**
* Note: these helpers are provided for convenience for C++/Qt applications.
* This is based on the public API in client.h, and it does not encode any
@@ -21,9 +30,6 @@
* for other languages.
*/
-#ifndef MPV_CLIENT_API_QTHELPER_H_
-#define MPV_CLIENT_API_QTHELPER_H_
-
#include <cstring>
#include <QVariant>
@@ -33,8 +39,6 @@
#include <QSharedPointer>
#include <QMetaType>
-#include <mpv/client.h>
-
namespace mpv {
namespace qt {
@@ -377,4 +381,6 @@ static inline QVariant command(mpv_handle *ctx, const QVariant &args)
Q_DECLARE_METATYPE(mpv::qt::ErrorReturn)
+#endif /* else #if MPV_ENABLE_DEPRECATED */
+
#endif