added runtime toggle of root window playback

only directx supports this at the moment


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13092 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
joey 2004-08-22 19:01:56 +00:00
parent 66dd2d906d
commit 896b8f4c2f
6 changed files with 34 additions and 0 deletions

View File

@ -95,6 +95,10 @@ vo_ontop
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]
???

View File

@ -100,6 +100,7 @@ static mp_cmd_t mp_cmds[] = {
#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}} } },

View File

@ -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

View File

@ -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

View File

@ -1260,6 +1260,18 @@ static uint32_t control(uint32_t request, void *data, ...)
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)

View File

@ -749,6 +749,7 @@ int osd_show_sub_changed = 0;
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;
@ -3042,6 +3043,17 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
#endif
}
} 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;
@ -3640,6 +3652,9 @@ if(rel_seek_secs || abs_seek_pos){
} 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" :