1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00

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.
This commit is contained in:
wm4 2012-08-06 19:05:32 +02:00
parent 0a20d13dfc
commit 97855746f1
3 changed files with 5 additions and 5 deletions

View File

@ -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:

View File

@ -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];

View File

@ -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;