summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-12-07 00:13:51 +0200
committerUoti Urpala <uau@mplayer2.org>2011-12-07 00:13:51 +0200
commitfe69b49ccc2bb3e00977f4110a59ffe3b0516d6f (patch)
treec78705f95df4143bc28d19db6ad36df2ab2cf215 /libvo/video_out.c
parent92e5414897707d998b4ba46664709347760f5b11 (diff)
parent82118dc35edfbf9b6714e1e4e6b1823fc3205ff7 (diff)
downloadmpv-fe69b49ccc2bb3e00977f4110a59ffe3b0516d6f.tar.bz2
mpv-fe69b49ccc2bb3e00977f4110a59ffe3b0516d6f.tar.xz
Merge remote-tracking branch 'wm4/window_title'
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r--libvo/video_out.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 2e507e48ea..205d618878 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -470,7 +470,7 @@ static int event_fd_callback(void *ctx, int fd)
int vo_config(struct vo *vo, uint32_t width, uint32_t height,
uint32_t d_width, uint32_t d_height, uint32_t flags,
- char *title, uint32_t format)
+ uint32_t format)
{
struct MPOpts *opts = vo->opts;
panscan_init(vo);
@@ -491,7 +491,7 @@ int vo_config(struct vo *vo, uint32_t width, uint32_t height,
}
int ret = vo->driver->config(vo, width, height, d_width, d_height, flags,
- title, format);
+ format);
vo->config_ok = (ret == 0);
vo->config_count += vo->config_ok;
if (vo->registered_fd == -1 && vo->event_fd != -1 && vo->config_ok) {
@@ -588,6 +588,18 @@ void calc_src_dst_rects(struct vo *vo, int src_width, int src_height,
dst->height = dst->bottom - dst->top;
}
+// Return the window title the VO should set. Always returns a null terminated
+// string. The string is valid until frontend code is invoked again. Copy it if
+// 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";
+ }
+}
+
/**
* Generates a mouse movement message if those are enable and sends it
* to the "main" MPlayer.