summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/client-api-changes.rst2
-rw-r--r--DOCS/client_api_examples/qml/main.cpp3
-rw-r--r--DOCS/client_api_examples/qml_direct/main.cpp13
-rw-r--r--DOCS/client_api_examples/qml_direct/main.h1
-rw-r--r--DOCS/man/mpv.rst33
-rw-r--r--DOCS/man/vo.rst16
-rw-r--r--DOCS/waf-buildsystem.rst5
7 files changed, 64 insertions, 9 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index 258e9653e2..62640889b6 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -26,6 +26,8 @@ API changes
::
--- mpv 0.9.0 will be released ---
+ 1.16 - add mpv_opengl_cb_report_flip()
+ - introduce mpv_opengl_cb_draw() and deprecate mpv_opengl_cb_render()
1.15 - mpv_initialize() will now load config files. This requires setting
the "config" and "config-dir" options. In particular, it will load
mpv.conf.
diff --git a/DOCS/client_api_examples/qml/main.cpp b/DOCS/client_api_examples/qml/main.cpp
index 69552e982c..2122cd8c5c 100644
--- a/DOCS/client_api_examples/qml/main.cpp
+++ b/DOCS/client_api_examples/qml/main.cpp
@@ -46,9 +46,8 @@ public:
void render()
{
QOpenGLFramebufferObject *fbo = framebufferObject();
- int vp[4] = {0, 0, fbo->width(), fbo->height()};
window->resetOpenGLState();
- mpv_opengl_cb_render(mpv_gl, fbo->handle(), vp);
+ mpv_opengl_cb_draw(mpv_gl, fbo->handle(), fbo->width(), fbo->height());
window->resetOpenGLState();
}
};
diff --git a/DOCS/client_api_examples/qml_direct/main.cpp b/DOCS/client_api_examples/qml_direct/main.cpp
index 5f1f1468cf..37c6119707 100644
--- a/DOCS/client_api_examples/qml_direct/main.cpp
+++ b/DOCS/client_api_examples/qml_direct/main.cpp
@@ -39,15 +39,13 @@ void MpvRenderer::paint()
{
window->resetOpenGLState();
- // Render to the whole window.
- int vp[4] = {0, 0, size.width(), -size.height()};
-
// This uses 0 as framebuffer, which indicates that mpv will render directly
// to the frontbuffer. Note that mpv will always switch framebuffers
// explicitly. Some QWindow setups (such as using QQuickWidget) actually
// want you to render into a FBO in the beforeRendering() signal, and this
// code won't work there.
- mpv_opengl_cb_render(mpv_gl, 0, vp);
+ // The negation is used for rendering with OpenGL's flipped coordinates.
+ mpv_opengl_cb_draw(mpv_gl, 0, size.width(), -size.height());
window->resetOpenGLState();
}
@@ -96,6 +94,8 @@ void MpvObject::handleWindowChanged(QQuickWindow *win)
this, &MpvObject::sync, Qt::DirectConnection);
connect(win, &QQuickWindow::sceneGraphInvalidated,
this, &MpvObject::cleanup, Qt::DirectConnection);
+ connect(win, &QQuickWindow::frameSwapped,
+ this, &MpvObject::swapped, Qt::DirectConnection);
win->setClearBeforeRendering(false);
}
@@ -110,6 +110,11 @@ void MpvObject::sync()
renderer->size = window()->size() * window()->devicePixelRatio();
}
+void MpvObject::swapped()
+{
+ mpv_opengl_cb_report_flip(mpv_gl, 0);
+}
+
void MpvObject::cleanup()
{
if (renderer) {
diff --git a/DOCS/client_api_examples/qml_direct/main.h b/DOCS/client_api_examples/qml_direct/main.h
index 66fe8c94a5..b0310ff0be 100644
--- a/DOCS/client_api_examples/qml_direct/main.h
+++ b/DOCS/client_api_examples/qml_direct/main.h
@@ -37,6 +37,7 @@ public:
public slots:
void command(const QVariant& params);
void sync();
+ void swapped();
void cleanup();
signals:
void onUpdate();
diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst
index 0a993d412e..ca1e87105e 100644
--- a/DOCS/man/mpv.rst
+++ b/DOCS/man/mpv.rst
@@ -610,6 +610,39 @@ PROTOCOLS
``memory://data``
Use the ``data`` part as source data.
+PSEUDO GUI MODE
+===============
+
+mpv has no official GUI, other than the OSC (`ON SCREEN CONTROLLER`_), which
+is not a full GUI and is not meant to be. However, to compensate for the lack
+of expected GUI behavior, mpv will in some cases start with some settings
+changed to behave slightly more like a GUI mode.
+
+Currently this happens only in the following cases:
+
+- if started using the ``mpv.desktop`` file on Linux (e.g. started from menus
+ or file associations provided by desktop environments)
+- if started from explorer.exe on Windows (technically, if it was started on
+ Windows, and all of the stdout/stderr/stdin handles are unset)
+- manually adding ``--profile=pseudo-gui`` to the command line
+
+This mode implicitly adds ``--profile=pseudo-gui`` to the command line, with
+the ``pseudo-gui`` profile being predefined with the following contents:
+
+::
+
+ [pseudo-gui]
+ terminal=no
+ force-window=yes
+ idle=once
+
+This follows the mpv config file format. To customize pseudo-GUI mode, you can
+put your own ``pseudo-gui`` profile into your ``mpv.conf``. This profile will
+enhance the default profile, rather than overwrite it.
+
+The profile always overrides other settings in ``mpv.conf``.
+
+
.. include:: options.rst
.. include:: ao.rst
diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst
index 5d4bbe1c61..2447a8c455 100644
--- a/DOCS/man/vo.rst
+++ b/DOCS/man/vo.rst
@@ -548,6 +548,16 @@ Available video output drivers are:
X11/GLX only.
+ ``dwmflush``
+ Calls ``DwmFlush`` after swapping buffers on Windows (default: 0).
+ It also sets ``SwapInterval(0)`` to ignore the OpenGL timing. Values
+ are: 0 (disabled), 1 (only in windowed mode), 2 (also in full screen).
+ This may help getting more consistent frame intervals, especially with
+ high-fps clips - which might also reduce dropped frames. Typically a
+ value of 1 should be enough since full screen may bypass the DWM.
+
+ Windows only.
+
``sw``
Continue even if a software renderer is detected.
@@ -682,7 +692,7 @@ Available video output drivers are:
Default is 128x256x64.
Sizes must be a power of two, and 512 at most.
- ``blend-subtitles``
+ ``blend-subtitles=<yes|video|no>``
Blend subtitles directly onto upscaled video frames, before
interpolation and/or color management (default: no). Enabling this
causes subtitles to be affected by ``icc-profile``, ``target-prim``,
@@ -693,6 +703,10 @@ Available video output drivers are:
visible portion of the video, so you can't have subtitles exist in the
black margins below a video (for example).
+ If ``video`` is selected, the behavior is similar to ``yes``, but subs
+ are drawn at the video's native resolution, and scaled along with the
+ video.
+
.. warning:: This changes the way subtitle colors are handled. Normally,
subtitle colors are assumed to be in sRGB and color managed
as such. Enabling this makes them treated as being in the
diff --git a/DOCS/waf-buildsystem.rst b/DOCS/waf-buildsystem.rst
index cc05511b2d..fa71cbbcd6 100644
--- a/DOCS/waf-buildsystem.rst
+++ b/DOCS/waf-buildsystem.rst
@@ -20,8 +20,9 @@ shortcomings:
part is this pieces are spread apart in the configure and copy pasted for
any single case. That brings us to..
-2) --enable-feature has to override the user and help him understand that he
- has libraries missing and should install them for the feature to be enabled.
+2) --enable-feature has to be overridden by the user and helps them understand that
+ they have libraries missing and should install them for the feature to be
+ enabled.
3) Must be customizable, hackable, pleasant to the developer eyes and to work
with in general.