diff options
author | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-01-04 16:46:15 +0000 |
---|---|---|
committer | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-01-04 16:46:15 +0000 |
commit | fde73bb200147e241d6f4e270a9d190059086e82 (patch) | |
tree | c2a0cbde4dfae9608591ae2da5321099a2a2bead /libmenu/vf_menu.c | |
parent | 5028a513dd5403f7c0e4e2e7ca4c46c1ce79a5cc (diff) | |
download | mpv-fde73bb200147e241d6f4e270a9d190059086e82.tar.bz2 mpv-fde73bb200147e241d6f4e270a9d190059086e82.tar.xz |
allows OSD menu to be displayed when using MPEG PES video out
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21821 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmenu/vf_menu.c')
-rw-r--r-- | libmenu/vf_menu.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c index 6f5f039dca..71d2f97098 100644 --- a/libmenu/vf_menu.c +++ b/libmenu/vf_menu.c @@ -37,6 +37,7 @@ int attribute_used menu_startup = 0; struct vf_priv_s { menu_t* root; menu_t* current; + int passthrough; }; static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts); @@ -178,6 +179,13 @@ inline static void copy_mpi(mp_image_t *dmpi, mp_image_t *mpi) { static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi = NULL; + if (vf->priv->passthrough) { + dmpi=vf_get_image(vf->next, IMGFMT_MPEGPES, MP_IMGTYPE_EXPORT, + 0, mpi->w, mpi->h); + dmpi->planes[0]=mpi->planes[0]; + return vf_next_put_image(vf,dmpi, pts); + } + if(vf->priv->current->show || (vf->priv->current->parent && vf->priv->current->parent->show)) { // Close all menu who requested it @@ -257,8 +265,15 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width, load_font_ft(width,height); } #endif + if(outfmt == IMGFMT_MPEGPES) + vf->priv->passthrough = 1; return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } + +static int query_format(struct vf_instance_s* vf, unsigned int fmt){ + return (vf_next_query_format(vf,fmt)); +} + static int open(vf_instance_t *vf, char* args){ if(!st_priv) { st_priv = calloc(1,sizeof(struct vf_priv_s)); @@ -273,6 +288,7 @@ static int open(vf_instance_t *vf, char* args){ } vf->config = config; + vf->query_format=query_format; vf->put_image = put_image; vf->get_image = get_image; vf->uninit=uninit; |