summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-22 16:15:52 +0200
committerwm4 <wm4@nowhere>2012-10-24 21:56:35 +0200
commit2afd7ebb4e96b91cc552fff5badf237dadb28212 (patch)
treec3c9d2dada28a42ceaa7cbaa293bb24ac622fe73
parente1e056fe5d5510bc8c7d70333b9f46fb656a581d (diff)
downloadmpv-2afd7ebb4e96b91cc552fff5badf237dadb28212.tar.bz2
mpv-2afd7ebb4e96b91cc552fff5badf237dadb28212.tar.xz
options: remove subtitle related options that did nothing
Most of these cased working when the OSD was switched to libass, or didn't do anything even before that. Also don't recursively include subreader.h in sub.h.
-rw-r--r--DOCS/man/en/options.rst29
-rw-r--r--cfg-mplayer.h8
-rw-r--r--sub/draw_bmp.c1
-rw-r--r--sub/find_subfiles.c1
-rw-r--r--sub/sub.c10
-rw-r--r--sub/sub.h17
6 files changed, 5 insertions, 61 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 3be707bfad..01a4610e20 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -1831,15 +1831,6 @@
Use/display these subtitle files. Only one file can be displayed at the
same time.
---sub-bg-alpha=<0-255>
- Specify the alpha channel value for subtitles and OSD backgrounds. Big
- values mean more transparency. 0 means completely transparent.
-
---sub-bg-color=<0-255>
- Specify the color value for subtitles and OSD backgrounds. Currently
- subtitles are grayscale so this value is equivalent to the intensity of
- the color. 255 means white and 0 black.
-
--sub-demuxer=<[+]name>
Force subtitle demuxer type for ``--subfile``. Using a '+' before the name
will force it, this will skip some checks! Give the demuxer name as
@@ -1921,19 +1912,6 @@
:2: proportional to movie width
:3: proportional to movie diagonal (default)
---subfont-blur=<0-8>
- Sets the font blur radius (default: 2).
-
---subfont-encoding=<value>
- Sets the font encoding. When set to 'unicode', all the glyphs from the
- font file will be rendered and unicode will be used (default: unicode).
-
---subfont-osd-scale=<0-100>
- Sets the autoscale coefficient of the OSD elements (default: 4).
-
---subfont-outline=<0-8>
- Sets the font outline thickness (default: 2).
-
--subfont-text-scale=<0-100>
Sets the subtitle text autoscale coefficient as percentage of the screen
size (default: 3.5).
@@ -1949,10 +1927,6 @@
position of the subtitle in % of the screen height.
Can be useful with ``--vf=expand``.
---subwidth=<10-100>
- Specify the maximum width of subtitles on the screen. Useful for TV-out.
- The value is the width of the subtitle in % of the screen width.
-
--sws=<n>
Specify the software scaler algorithm to be used with the ``--zoom``
option. This affects video output drivers which lack hardware
@@ -2198,9 +2172,6 @@
the device (default: 50). A signal strength higher than this value will
indicate that the currently scanning channel is active.
---unicode
- Tells mpv to handle the subtitle file as unicode.
-
--use-filedir-conf
Look for a file-specific configuration file in the same directory as the
file that is being played.
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 975c11b9ff..ef76cdc079 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -516,27 +516,19 @@ const m_option_t common_opts[] = {
{"sub-delay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
{"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
OPT_MAKE_FLAGS("autosub", sub_auto, 0),
- {"unicode", &sub_unicode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"sub-forced-only", &forced_subs_only, CONF_TYPE_FLAG, 0, 0, 1, NULL},
// specify IFO file for VOBSUB subtitle
{"ifo", &spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, NULL},
// enable Closed Captioning display
{"overlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 2, NULL},
- {"sub-bg-color", &sub_bg_color, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
- {"sub-bg-alpha", &sub_bg_alpha, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
{"sub-no-text-pp", &sub_no_text_pp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"sub-fuzziness", &sub_match_fuzziness, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
{"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"subfont", &sub_font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
{"sub-pos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
- {"subwidth", &sub_width_p, CONF_TYPE_INT, CONF_RANGE, 10, 100, NULL},
- {"subfont-encoding", &subtitle_font_encoding, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
- {"subfont-osd-scale", &osd_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
- {"subfont-blur", &subtitle_font_radius, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
- {"subfont-outline", &subtitle_font_thickness, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
{"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
OPT_MAKE_FLAGS("ass", ass_enabled, 0),
OPT_FLOATRANGE("ass-font-scale", ass_font_scale, 0, 0, 100),
diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c
index 1008b1b23e..d58033fceb 100644
--- a/sub/draw_bmp.c
+++ b/sub/draw_bmp.c
@@ -18,6 +18,7 @@
#include "sub/draw_bmp.h"
+#include <stddef.h>
#include <stdbool.h>
#include <assert.h>
#include <math.h>
diff --git a/sub/find_subfiles.c b/sub/find_subfiles.c
index b073a722c6..2e705bd4d1 100644
--- a/sub/find_subfiles.c
+++ b/sub/find_subfiles.c
@@ -12,6 +12,7 @@
#include "mpcommon.h"
#include "sub/find_subfiles.h"
#include "sub/sub.h"
+#include "sub/subreader.h"
static struct bstr strip_ext(struct bstr str)
{
diff --git a/sub/sub.c b/sub/sub.c
index 8281081334..04fbcd877c 100644
--- a/sub/sub.c
+++ b/sub/sub.c
@@ -39,6 +39,7 @@
#include "img_convert.h"
#include "draw_bmp.h"
#include "spudec.h"
+#include "subreader.h"
char * const sub_osd_names[]={
@@ -58,21 +59,12 @@ char * const sub_osd_names[]={
};
char * const sub_osd_names_short[] ={ "", "|>", "||", "[]", "<<" , ">>", "", "", "", "", "", "", "" };
-int sub_unicode=0;
int sub_utf8=0;
int sub_pos=100;
-int sub_width_p=100;
int sub_visibility=1;
-int sub_bg_color=0; /* subtitles background color */
-int sub_bg_alpha=0;
-int sub_justify=0;
subtitle* vo_sub=NULL;
-char *subtitle_font_encoding = NULL;
float text_font_scale_factor = 3.5;
-float osd_font_scale_factor = 4.0;
-float subtitle_font_radius = 2.0;
-float subtitle_font_thickness = 2.0;
// 0 = no autoscale
// 1 = video height
// 2 = video width
diff --git a/sub/sub.h b/sub/sub.h
index cc03396f04..2c54bfb56b 100644
--- a/sub/sub.h
+++ b/sub/sub.h
@@ -19,14 +19,10 @@
#ifndef MPLAYER_SUB_H
#define MPLAYER_SUB_H
+#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
-#include "subreader.h"
-
-struct vo;
-struct sub_render_params;
-
// NOTE: VOs must support at least SUBBITMAP_LIBASS and SUBBITMAP_RGBA.
enum sub_bitmap_format {
SUBBITMAP_EMPTY = 0,// no bitmaps; always has num_parts==0
@@ -145,7 +141,7 @@ struct osd_state {
struct ass_library *osd_ass_library;
};
-extern subtitle* vo_sub;
+extern struct subtitle* vo_sub;
extern void* vo_spudec;
extern void* vo_vobsub;
@@ -180,20 +176,12 @@ enum mp_osd_font_codepoints {
extern char * const sub_osd_names[];
extern char * const sub_osd_names_short[];
-extern int sub_unicode;
extern int sub_utf8;
extern char *sub_cp;
extern int sub_pos;
-extern int sub_width_p;
-extern int sub_bg_color; /* subtitles background color */
-extern int sub_bg_alpha;
-extern char *subtitle_font_encoding;
extern float text_font_scale_factor;
-extern float osd_font_scale_factor;
-extern float subtitle_font_radius;
-extern float subtitle_font_thickness;
extern int subtitle_autoscale;
extern char *font_name;
@@ -202,7 +190,6 @@ extern float font_factor;
extern float sub_delay;
extern float sub_fps;
-extern int sub_justify;
struct osd_state *osd_create(struct MPOpts *opts, struct ass_library *asslib);
void osd_set_text(struct osd_state *osd, const char *text);