You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dd><p class="first">Return a screenshot in memory. This can be used only through the client
12399
12403
API. The MPV_FORMAT_NODE_MAP returned by this command has the <tt class="docutils literal">w</tt>, <tt class="docutils literal">h</tt>,
12400
-
<tt class="docutils literal">stride</tt> fields set to obvious contents. The <tt class="docutils literal">format</tt> field is set to
12401
-
<tt class="docutils literal">bgr0</tt> by default. This format is organized as <tt class="docutils literal">B8G8R8X8</tt> (where <tt class="docutils literal">B</tt>
12402
-
is the LSB). The contents of the padding <tt class="docutils literal">X</tt> are undefined. The <tt class="docutils literal">data</tt>
12403
-
field is of type MPV_FORMAT_BYTE_ARRAY with the actual image data. The image
12404
-
is freed as soon as the result mpv_node is freed. As usual with client API
12405
-
semantics, you are not allowed to write to the image data.</p>
12404
+
<tt class="docutils literal">stride</tt> fields set to obvious contents.</p>
12405
+
<p>The <tt class="docutils literal">format</tt> field is set to the format of the screenshot image data.
12406
+
This can be controlled by the <tt class="docutils literal">format</tt> argument. The format can be one of
12407
+
the following:</p>
12408
+
<dl class="docutils">
12409
+
<dt>bgr0 (default)</dt>
12410
+
<dd>This format is organized as <tt class="docutils literal">B8G8R8X8</tt> (where <tt class="docutils literal">B</tt> is the LSB).
12411
+
The contents of the padding <tt class="docutils literal">X</tt> are undefined.</dd>
12412
+
<dt>bgra</dt>
12413
+
<dd>This format is organized as <tt class="docutils literal">B8G8R8A8</tt> (where <tt class="docutils literal">B</tt> is the LSB).</dd>
12414
+
<dt>rgba</dt>
12415
+
<dd>This format is organized as <tt class="docutils literal">R8G8B8A8</tt> (where <tt class="docutils literal">R</tt> is the LSB).</dd>
12416
+
<dt>rgba64</dt>
12417
+
<dd>This format is organized as <tt class="docutils literal">R16G16B16A16</tt> (where <tt class="docutils literal">R</tt> is the LSB).
12418
+
Each component occupies 2 bytes per pixel.
12419
+
When this format is used, the image data will be high bit depth, and
12420
+
<tt class="docutils literal"><span class="pre">--screenshot-high-bit-depth</span></tt> is ignored.</dd>
12421
+
</dl>
12422
+
<p>The <tt class="docutils literal">data</tt> field is of type MPV_FORMAT_BYTE_ARRAY with the actual image
12423
+
data. The image is freed as soon as the result mpv_node is freed. As usual
12424
+
with client API semantics, you are not allowed to write to the image data.</p>
12406
12425
<p>The <tt class="docutils literal">stride</tt> is the number of bytes from a pixel at <tt class="docutils literal">(x0, y0)</tt> to the
12407
-
pixel at <tt class="docutils literal">(x0, y0 + 1)</tt>. This can be larger than <tt class="docutils literal">w * 4</tt> if the image
12426
+
pixel at <tt class="docutils literal">(x0, y0 + 1)</tt>. This can be larger than <tt class="docutils literal">w * bpp</tt> if the image
12408
12427
was cropped, or if there is padding. This number can be negative as well.
12409
-
You access a pixel with <tt class="docutils literal">byte_index = y * stride + x * 4</tt> (assuming the
<dd>The directory in which watch later config files are stored. This returns
14415
+
<tt class="docutils literal"><span class="pre">--watch-later-dir</span></tt>, or the default directory if <tt class="docutils literal"><span class="pre">--watch-later-dir</span></tt> has
14416
+
not been modified, with tilde placeholders expanded.</dd>
0 commit comments