summaryrefslogtreecommitdiffstats
path: root/sub/osd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-24 17:46:14 +0100
committerwm4 <wm4@nowhere>2013-12-24 17:46:14 +0100
commit3720b3f17d4951ab839418b5cbfd1a85eb74adba (patch)
tree819b311b4c224ba2fd3dcd0efe8008a83f2cc938 /sub/osd.h
parent9292f537d661af16321fd35eb0016e830594863b (diff)
downloadmpv-3720b3f17d4951ab839418b5cbfd1a85eb74adba.tar.bz2
mpv-3720b3f17d4951ab839418b5cbfd1a85eb74adba.tar.xz
player: add --secondary-sid for displaying a second subtitle stream
This is relatively hacky, but it's Christmas, so it's ok. This does two things: 1. allow selecting two subtitle tracks, and 2. include a hack that renders the second subtitle always as toptitle. See manpage additions how to use this.
Diffstat (limited to 'sub/osd.h')
-rw-r--r--sub/osd.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/sub/osd.h b/sub/osd.h
index 9714a06c18..17e8a02c08 100644
--- a/sub/osd.h
+++ b/sub/osd.h
@@ -84,7 +84,7 @@ struct mp_osd_res {
enum mp_osdtype {
OSDTYPE_SUB,
- OSDTYPE_SUBTEXT,
+ OSDTYPE_SUB2,
OSDTYPE_NAV_HIGHLIGHT, // dvdnav fake highlights
@@ -105,6 +105,12 @@ struct osd_object {
bool force_redraw;
+ // OSDTYPE_SUB
+ struct dec_sub *dec_sub;
+ double video_offset;
+ bool render_bitmap_subs;
+ char *sub_text;
+
// caches for OSD conversion (internal to render_object())
struct osd_conv_cache *cache[OSD_CONV_CACHE_MAX];
struct sub_bitmaps cached;
@@ -124,11 +130,9 @@ struct osd_object {
struct osd_state {
struct osd_object *objs[MAX_OSD_PARTS];
- double video_offset;
double vo_pts;
bool render_subs_in_filter;
- bool render_bitmap_subs;
struct mp_osd_res last_vo_res;
@@ -136,8 +140,6 @@ struct osd_state {
// OSDTYPE_OSD
char *osd_text;
- // OSDTYPE_SUBTEXT
- char *sub_text;
// OSDTYPE_PROGBAR
int progbar_type; // <0: disabled, 1-255: symbol, else: no symbol
float progbar_value; // range 0.0-1.0
@@ -148,8 +150,6 @@ struct osd_state {
int external_res_x, external_res_y;
// OSDTYPE_EXTERNAL2
struct sub_bitmaps external2;
- // OSDTYPE_SUB
- struct dec_sub *dec_sub;
// OSDTYPE_NAV_HIGHLIGHT
void *highlight_priv;
@@ -206,7 +206,7 @@ extern const struct m_sub_options osd_style_conf;
struct osd_state *osd_create(struct mpv_global *global);
void osd_set_text(struct osd_state *osd, const char *text);
-void osd_set_sub(struct osd_state *osd, const char *text);
+void osd_set_sub(struct osd_state *osd, struct osd_object *obj, const char *text);
void osd_changed(struct osd_state *osd, int new_value);
void osd_changed_all(struct osd_state *osd);
void osd_free(struct osd_state *osd);