Mercurial > mplayer.hg
changeset 13091:25f51c72eb06
added runtime toggle of root window playback
only directx supports this at the moment
author | joey |
---|---|
date | Sun, 22 Aug 2004 19:01:56 +0000 |
parents | 0c37bcfc5ef0 |
children | 36701f60f093 |
files | DOCS/tech/slave.txt input/input.c input/input.h libvo/video_out.h libvo/vo_directx.c mplayer.c |
diffstat | 6 files changed, 34 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/tech/slave.txt Sun Aug 22 18:57:45 2004 +0000 +++ b/DOCS/tech/slave.txt Sun Aug 22 19:01:56 2004 +0000 @@ -95,6 +95,10 @@ Toggle stay-on-top. Supported by drivers which use X11, except SDL, as well as directx and gl2 under Windows. +vo_rootwin + Toggle playback on the root window. This runtime toggle is only + supported by the directx driver at the moment. + panscan <value> [value2] ???
--- a/input/input.c Sun Aug 22 18:57:45 2004 +0000 +++ b/input/input.c Sun Aug 22 19:01:56 2004 +0000 @@ -100,6 +100,7 @@ #endif { MP_CMD_VO_FULLSCREEN, "vo_fullscreen", 0, { {-1,{0}} } }, { MP_CMD_VO_ONTOP, "vo_ontop", 0, { {-1,{0}} } }, + { MP_CMD_VO_ROOTWIN, "vo_rootwin", 0, { {-1,{0}} } }, { MP_CMD_SCREENSHOT, "screenshot", 0, { {-1,{0}} } }, { MP_CMD_PANSCAN, "panscan",1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
--- a/input/input.h Sun Aug 22 18:57:45 2004 +0000 +++ b/input/input.h Sun Aug 22 19:01:56 2004 +0000 @@ -54,6 +54,7 @@ #define MP_CMD_SUB_FORCED_ONLY 50 #define MP_CMD_VO_ONTOP 51 #define MP_CMD_SUB_SELECT 52 +#define MP_CMD_VO_ROOTWIN 53 #define MP_CMD_GUI_EVENTS 5000 #define MP_CMD_GUI_LOADFILE 5001
--- a/libvo/video_out.h Sun Aug 22 18:57:45 2004 +0000 +++ b/libvo/video_out.h Sun Aug 22 19:01:56 2004 +0000 @@ -56,6 +56,7 @@ #define VOCTRL_START_SLICE 21 #define VOCTRL_ONTOP 25 +#define VOCTRL_ROOTWIN 26 // Vo can be used by xover #define VOCTRL_XOVERLAY_SUPPORT 22
--- a/libvo/vo_directx.c Sun Aug 22 18:57:45 2004 +0000 +++ b/libvo/vo_directx.c Sun Aug 22 19:01:56 2004 +0000 @@ -1260,6 +1260,18 @@ Directx_ManageDisplay(); } return VO_TRUE; + case VOCTRL_ROOTWIN: + if(vidmode) + { + mp_msg(MSGT_VO, MSGL_ERR,"<vo_directx><ERROR>rootwin has no meaning in exclusive mode\n"); + } + else + { + if(vo_rootwin) vo_rootwin = 0; + else vo_rootwin = 1; + Directx_ManageDisplay(); + } + return VO_TRUE; case VOCTRL_FULLSCREEN: { if(vidmode)
--- a/mplayer.c Sun Aug 22 18:57:45 2004 +0000 +++ b/mplayer.c Sun Aug 22 19:01:56 2004 +0000 @@ -749,6 +749,7 @@ int osd_show_percentage = 0; int osd_show_tv_channel = 25; int osd_show_ontop = 0; +int osd_show_rootwin = 0; int osd_show_framedropping = 0; int rtc_fd=-1; @@ -3043,6 +3044,17 @@ } } break; + case MP_CMD_VO_ROOTWIN: + { + if(video_out && vo_config_count) { + video_out->control(VOCTRL_ROOTWIN, 0); +#ifdef USE_OSD + osd_show_rootwin=10; + vo_osd_changed(OSDTYPE_SUBTITLE); +#endif + } + + } break; case MP_CMD_PANSCAN : { if ( !video_out ) break; if ( video_out->control( VOCTRL_GET_PANSCAN,NULL ) == VO_TRUE ) @@ -3640,6 +3652,9 @@ } else if (osd_show_ontop) { snprintf(osd_text_tmp, 63, "Stay on top: %sabled", vo_ontop?"en":"dis"); osd_show_ontop--; + } else if (osd_show_rootwin) { + snprintf(osd_text_tmp, 63, "Rootwin: %sabled", vo_rootwin?"en":"dis"); + osd_show_rootwin--; } else if (osd_show_framedropping) { snprintf(osd_text_tmp, 63, "Framedropping: %s", (frame_dropping == 1 ? "on" :