summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-02 02:36:26 +0200
committerwm4 <wm4@nowhere>2012-08-02 02:37:00 +0200
commitd5315a678ea93110f8bde10fe83eca64202988d1 (patch)
tree9f6212fb1192ef42658a98c31f746cbf28af054e /libvo
parentc7a15ed0ddf56b80a962a6aeb5da7981472ceaf2 (diff)
downloadmpv-d5315a678ea93110f8bde10fe83eca64202988d1.tar.bz2
mpv-d5315a678ea93110f8bde10fe83eca64202988d1.tar.xz
mplayer: expand --title as property, remove --use-filename-title
The --title option, which sets the GUI window caption, is now expanded as slave mode property string (like osd_show_property_text). Make the default value for --title include the filename. This makes a behavior similar to --use-filename-title the default. Remove the --use-filename-title option, as it's redundant now.
Diffstat (limited to 'libvo')
-rw-r--r--libvo/video_out.c7
-rw-r--r--libvo/video_out.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 7f78a2d07c..1063876640 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -345,6 +345,7 @@ struct vo *init_best_video_out(struct MPOpts *opts, struct vo_x11_state *x11,
.input_ctx = input_ctx,
.event_fd = -1,
.registered_fd = -1,
+ .window_title = talloc_strdup(vo, ""),
};
// first try the preferred drivers, with their optional subdevice param:
if (vo_list && vo_list[0])
@@ -526,11 +527,7 @@ void calc_src_dst_rects(struct vo *vo, int src_width, int src_height,
// you need to keep the string for an extended period of time.
const char *vo_get_window_title(struct vo *vo)
{
- if (vo->opts->vo_wintitle) {
- return vo->opts->vo_wintitle;
- } else {
- return "mplayer2";
- }
+ return vo->window_title;
}
/**
diff --git a/libvo/video_out.h b/libvo/video_out.h
index e9d9e69202..3fcb420d2a 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -293,6 +293,8 @@ struct vo {
int scrh; // vertical resolution
float asp;
} aspdat;
+
+ char *window_title;
};
struct vo *init_best_video_out(struct MPOpts *opts, struct vo_x11_state *x11,