summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2011-12-06 20:23:54 +0100
committerwm4 <wm4@mplayer2.org>2011-12-06 20:32:33 +0100
commitd4de92e80897abb64dc8ccecb7823cbe291bb52d (patch)
tree0686f943152165b2cab91a79287ea788083bc474 /libvo/video_out.c
parent421c840b3c061de89b426244fe75237a73f765de (diff)
downloadmpv-d4de92e80897abb64dc8ccecb7823cbe291bb52d.tar.bz2
mpv-d4de92e80897abb64dc8ccecb7823cbe291bb52d.tar.xz
libvo: remove title argument from struct vo_driver.config
This affects only the "new" VO API. The config() title argument was barely used, and it's hardcoded to "MPlayer" in vf_vo.c. The X11 and the Cocoa GUI backends, which are the only ones properly supporting window titles, ignored this argument. Remove the title argument. Add the vo_get_window_title function. All GUI VOs are supposed to use it for the 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 e796784b1e..8c2f551e4c 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -437,7 +437,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);
@@ -458,7 +458,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) {
@@ -552,6 +552,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 "MPlayer";
+ }
+}
+
/**
* Generates a mouse movement message if those are enable and sends it
* to the "main" MPlayer.