summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-06 19:05:32 +0200
committerwm4 <wm4@nowhere>2012-08-06 19:05:32 +0200
commit97855746f1c6c69a0ac929c38e72854b83bae63c (patch)
tree37c502449404a9baafc8261a0be751b9118662ba
parent0a20d13dfc77cbf1aa86ef8183306243985041b7 (diff)
downloadmpv-97855746f1c6c69a0ac929c38e72854b83bae63c.tar.bz2
mpv-97855746f1c6c69a0ac929c38e72854b83bae63c.tar.xz
image_writer: rename "filetype" option to "format"
Although slightly less precise, this sounds less clunky. This change also causes the --screenshot-filetype option to be renamed to --screenshot-format.
-rw-r--r--DOCS/man/en/options.rst2
-rw-r--r--image_writer.c6
-rw-r--r--image_writer.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 323f498f5e..4810ee9ea5 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -1644,7 +1644,7 @@
Seek to byte position. Useful for playback from CD-ROM images or VOB files
with junk at the beginning. See also ``--ss``.
---screenshot-filetype=<type>
+--screenshot-format=<type>
Set the image file type used for saving screenshots.
Available choices:
diff --git a/image_writer.c b/image_writer.c
index af1002164e..8e875884d1 100644
--- a/image_writer.c
+++ b/image_writer.c
@@ -46,7 +46,7 @@
#include "m_option.h"
const struct image_writer_opts image_writer_opts_defaults = {
- .filetype = "png",
+ .format = "png",
.png_compression = 7,
.jpeg_quality = 85,
.jpeg_optimize = 100,
@@ -68,7 +68,7 @@ const struct m_sub_options image_writer_conf = {
OPT_MAKE_FLAGS("jpeg-progressive", jpeg_progressive, 0),
OPT_MAKE_FLAGS("jpeg-baseline", jpeg_baseline, 0),
OPT_INTRANGE("png-compression", png_compression, 0, 0, 9),
- OPT_STRING("filetype", filetype, 0),
+ OPT_STRING("format", format, 0),
{0},
},
.size = sizeof(struct image_writer_opts),
@@ -239,7 +239,7 @@ static const struct img_writer img_writers[] = {
static const struct img_writer *get_writer(const struct image_writer_opts *opts)
{
- const char *type = opts->filetype;
+ const char *type = opts->format;
for (size_t n = 0; n < sizeof(img_writers) / sizeof(img_writers[0]); n++) {
const struct img_writer *writer = &img_writers[n];
diff --git a/image_writer.h b/image_writer.h
index fb230684d2..9df1d88583 100644
--- a/image_writer.h
+++ b/image_writer.h
@@ -19,7 +19,7 @@ struct mp_image;
struct mp_csp_details;
struct image_writer_opts {
- char *filetype;
+ char *format;
int png_compression;
int jpeg_quality;
int jpeg_optimize;